r1699 - branches/nexuiz-2.0/data/qcsrc/server
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Fri Jun 30 08:50:40 EDT 2006
Author: div0
Date: 2006-06-30 08:50:39 -0400 (Fri, 30 Jun 2006)
New Revision: 1699
Modified:
branches/nexuiz-2.0/data/qcsrc/server/cl_weapons.qc
branches/nexuiz-2.0/data/qcsrc/server/cl_weaponsystem.qc
branches/nexuiz-2.0/data/qcsrc/server/defs.qh
Log:
weapon_thinkf now is safe to be called twice in a frame (fixes another "hagar fires slowly" bug)
(fixes a bug fixed in r1634 and introduced again in r1648)
Modified: branches/nexuiz-2.0/data/qcsrc/server/cl_weapons.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/cl_weapons.qc 2006-06-30 11:12:43 UTC (rev 1698)
+++ branches/nexuiz-2.0/data/qcsrc/server/cl_weapons.qc 2006-06-30 12:50:39 UTC (rev 1699)
@@ -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: branches/nexuiz-2.0/data/qcsrc/server/cl_weaponsystem.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/cl_weaponsystem.qc 2006-06-30 11:12:43 UTC (rev 1698)
+++ branches/nexuiz-2.0/data/qcsrc/server/cl_weaponsystem.qc 2006-06-30 12:50:39 UTC (rev 1699)
@@ -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: branches/nexuiz-2.0/data/qcsrc/server/defs.qh
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/defs.qh 2006-06-30 11:12:43 UTC (rev 1698)
+++ branches/nexuiz-2.0/data/qcsrc/server/defs.qh 2006-06-30 12:50:39 UTC (rev 1699)
@@ -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