r3216 - trunk/data/qcsrc/server
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Mon Jan 21 15:47:53 EST 2008
Author: lordhavoc
Date: 2008-01-21 15:47:53 -0500 (Mon, 21 Jan 2008)
New Revision: 3216
Modified:
trunk/data/qcsrc/server/cl_weaponsystem.qc
Log:
fix attack_finished timing on first shot of a burst, this mostly affects
the machinegun (which would often shoot twice near-instantly and then
begin normal firing)
Modified: trunk/data/qcsrc/server/cl_weaponsystem.qc
===================================================================
--- trunk/data/qcsrc/server/cl_weaponsystem.qc 2008-01-21 20:19:06 UTC (rev 3215)
+++ trunk/data/qcsrc/server/cl_weaponsystem.qc 2008-01-21 20:47:53 UTC (rev 3216)
@@ -428,7 +428,10 @@
if (self.weaponentity.state != WS_READY)
return FALSE;
self.weaponentity.state = WS_INUSE;
- ATTACK_FINISHED(self) = max(time, ATTACK_FINISHED(self) + attacktime);
+ // if the weapon hasn't been firing continuously, reset the timer
+ if (ATTACK_FINISHED(self) < time - frametime)
+ ATTACK_FINISHED(self) = time;
+ ATTACK_FINISHED(self) = ATTACK_FINISHED(self) + attacktime;
return TRUE;
};
More information about the nexuiz-commits
mailing list