r1722 - trunk/data/qcsrc/server
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Tue Jul 4 19:16:58 EDT 2006
Author: div0
Date: 2006-07-04 19:16:58 -0400 (Tue, 04 Jul 2006)
New Revision: 1722
Modified:
trunk/data/qcsrc/server/cl_weaponsystem.qc
trunk/data/qcsrc/server/w_uzi.qc
Log:
sometimes weapon disappears completely. Maybe the WS_RAISE animation gets cancelled by a later weapon_thinkf? added debug assertion against this.
uzi now switches away immediately
Modified: trunk/data/qcsrc/server/cl_weaponsystem.qc
===================================================================
--- trunk/data/qcsrc/server/cl_weaponsystem.qc 2006-07-04 21:50:28 UTC (rev 1721)
+++ trunk/data/qcsrc/server/cl_weaponsystem.qc 2006-07-04 23:16:58 UTC (rev 1722)
@@ -378,6 +378,11 @@
self.weaponentity.frame = fr;
}
+ if(self.weapon_think == w_ready && func != w_ready && self.weaponentity.state == WS_RAISE)
+ {
+ error("Tried to override initial weapon think function - should this really happen?\n");
+ }
+
if(cvar("g_runematch"))
{
if(self.runes & RUNE_SPEED)
Modified: trunk/data/qcsrc/server/w_uzi.qc
===================================================================
--- trunk/data/qcsrc/server/w_uzi.qc 2006-07-04 21:50:28 UTC (rev 1721)
+++ trunk/data/qcsrc/server/w_uzi.qc 2006-07-04 23:16:58 UTC (rev 1722)
@@ -44,8 +44,13 @@
// weapon frames
void() uzi_fire1_02 =
{
- if (self.button0 && self.weapon == self.switchweapon)
+ if(self.weapon != self.switchweapon) // abort immediately if switching
{
+ w_ready();
+ return;
+ }
+ if (self.button0)
+ {
if (!weapon_action(self.weapon, WR_CHECKAMMO2))
{
self.switchweapon = w_getbestweapon(self);
More information about the nexuiz-commits
mailing list