r1697 - trunk/data/qcsrc/server
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Fri Jun 30 06:18:38 EDT 2006
Author: div0
Date: 2006-06-30 06:18:38 -0400 (Fri, 30 Jun 2006)
New Revision: 1697
Modified:
trunk/data/qcsrc/server/cl_weapons.qc
trunk/data/qcsrc/server/cl_weaponsystem.qc
trunk/data/qcsrc/server/defs.qh
Log:
weapon_thinkf now is safe to be called twice in a frame (fixes another "hagar fires slowly" bug)
Modified: trunk/data/qcsrc/server/cl_weapons.qc
===================================================================
--- trunk/data/qcsrc/server/cl_weapons.qc 2006-06-29 19:35:48 UTC (rev 1696)
+++ trunk/data/qcsrc/server/cl_weapons.qc 2006-06-30 10:18:38 UTC (rev 1697)
@@ -288,7 +288,10 @@
c = c + 1;
weapon_action(self.weapon, WR_THINK);
if (self.weapon_nextthink > 0 && time >= self.weapon_nextthink)
+ {
+ self.weapon_nextthink_lastframe = self.weapon_nextthink;
self.weapon_think();
+ }
}
// don't let attack_finished fall behind when not firing
Modified: trunk/data/qcsrc/server/cl_weaponsystem.qc
===================================================================
--- trunk/data/qcsrc/server/cl_weaponsystem.qc 2006-06-29 19:35:48 UTC (rev 1696)
+++ trunk/data/qcsrc/server/cl_weaponsystem.qc 2006-06-30 10:18:38 UTC (rev 1697)
@@ -394,7 +394,7 @@
}
// VorteX: haste can be added here
- self.weapon_nextthink = max(time, self.weapon_nextthink + t);
+ self.weapon_nextthink = max(time, self.weapon_nextthink_lastframe + t);
self.weapon_think = func;
};
Modified: trunk/data/qcsrc/server/defs.qh
===================================================================
--- trunk/data/qcsrc/server/defs.qh 2006-06-29 19:35:48 UTC (rev 1696)
+++ trunk/data/qcsrc/server/defs.qh 2006-06-30 10:18:38 UTC (rev 1697)
@@ -115,6 +115,7 @@
// VorteX: standalone think for weapons, so normal think on weaponentity can be reserved by weaponflashes (which needs update even player dies)
.float weapon_nextthink;
.void() weapon_think;
+.float weapon_nextthink_lastframe;
//float PLAYER_WEAPONSELECTION_DELAY = );
float PLAYER_WEAPONSELECTION_SPEED = 18;
More information about the nexuiz-commits
mailing list