r1764 - trunk/data/qcsrc/server
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Thu Jul 20 04:32:25 EDT 2006
Author: lordhavoc
Date: 2006-07-20 04:32:25 -0400 (Thu, 20 Jul 2006)
New Revision: 1764
Modified:
trunk/data/qcsrc/server/bots.qc
Log:
convert degrees to radians before calling cos in maxfiredeviation check
Modified: trunk/data/qcsrc/server/bots.qc
===================================================================
--- trunk/data/qcsrc/server/bots.qc 2006-07-19 19:54:32 UTC (rev 1763)
+++ trunk/data/qcsrc/server/bots.qc 2006-07-20 08:32:25 UTC (rev 1764)
@@ -1557,7 +1557,8 @@
//bprint("e ");bprintvector(diffang);bprint(" < ");bprintfloat(maxfiredeviation);bprint("\n");
// decide whether to fire this time
- if ((normalize(v) * shotdir) >= cos(maxfiredeviation))
+ // note the maxfiredeviation is in degrees so this has to convert to radians first
+ if ((normalize(v) * shotdir) >= cos(maxfiredeviation * (3.14159265358979323846 / 180)))
self.bot_firetimer = time + 0.3;
//dprint(" diff:", vtos(diffang), "\n");
More information about the nexuiz-commits
mailing list