r5253 - trunk/data/qcsrc/server
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Wed Dec 17 09:27:16 EST 2008
Author: div0
Date: 2008-12-17 09:27:16 -0500 (Wed, 17 Dec 2008)
New Revision: 5253
Modified:
trunk/data/qcsrc/server/g_hook.qc
Log:
make hook switch also when trying to use the hook button
Modified: trunk/data/qcsrc/server/g_hook.qc
===================================================================
--- trunk/data/qcsrc/server/g_hook.qc 2008-12-17 14:08:51 UTC (rev 5252)
+++ trunk/data/qcsrc/server/g_hook.qc 2008-12-17 14:27:16 UTC (rev 5253)
@@ -84,6 +84,7 @@
}
.float hook_length;
+.float hook_switchweapon;
void RemoveGrapplingHook(entity pl)
{
@@ -407,6 +408,12 @@
//self.hook_state &~= HOOK_RELEASING;
}
}
+ else if(!g_grappling_hook && self.switchweapon != WEP_HOOK)
+ {
+ if(self.BUTTON_HOOK && !self.hook_switchweapon)
+ W_SwitchWeapon(WEP_HOOK);
+ }
+ self.hook_switchweapon = self.BUTTON_HOOK;
if(!g_grappling_hook && self.weapon != WEP_HOOK)
{
@@ -427,6 +434,7 @@
RemoveGrapplingHook(self);
self.hook_state &~= HOOK_REMOVING;
}
+
/*
// if I have no hook or it's not pulling yet, make sure I'm not flying!
if((self.hook == world || !self.hook.state) && self.movetype == MOVETYPE_FLY)
More information about the nexuiz-commits
mailing list