r2047 - branches/nexuiz-2.0/data/qcsrc/server
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Thu Dec 14 04:27:13 EST 2006
Author: div0
Date: 2006-12-14 04:27:13 -0500 (Thu, 14 Dec 2006)
New Revision: 2047
Modified:
branches/nexuiz-2.0/data/qcsrc/server/bots.qc
Log:
fix division by zero in bots (thanks DCC)
Modified: branches/nexuiz-2.0/data/qcsrc/server/bots.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/bots.qc 2006-12-13 08:37:01 UTC (rev 2046)
+++ branches/nexuiz-2.0/data/qcsrc/server/bots.qc 2006-12-14 09:27:13 UTC (rev 2047)
@@ -1530,7 +1530,7 @@
// turn
local float r, fixedrate, blendrate;
- fixedrate = cvar("bot_ai_aimskill_fixedrate") / dist;
+ fixedrate = cvar("bot_ai_aimskill_fixedrate") / max(1, dist);
blendrate = cvar("bot_ai_aimskill_blendrate");
r = max(fixedrate, blendrate);
self.v_angle = self.v_angle + diffang * bound(0, r * frametime * (skill * 0.5 + 2), 1);
More information about the nexuiz-commits
mailing list