Enable having to reload your weapon after dropping it by getting swallowed. This...
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Tue, 1 Mar 2011 22:47:42 +0000 (00:47 +0200)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Tue, 1 Mar 2011 22:47:42 +0000 (00:47 +0200)
data/qcsrc/server/cl_player.qc

index 92f0dca..6aaffd2 100644 (file)
@@ -357,9 +357,9 @@ void player_anim (void)
                setanim(self.weaponentity, self.weaponentity.anim_idle, TRUE, FALSE, FALSE);\r
 }\r
 \r
-void SpawnThrownWeapon (vector org, float w)\r
+void SpawnThrownWeapon (vector org, float w, float doreduce)\r
 {\r
-       W_ThrowWeapon(randomvec() * 125 + '0 0 200', org - self.origin, FALSE);\r
+       W_ThrowWeapon(randomvec() * 125 + '0 0 200', org - self.origin, doreduce);\r
 }\r
 \r
 void PlayerCorpseDamage (entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force)\r
@@ -593,7 +593,7 @@ void PlayerDamage (entity inflictor, entity attacker, float damage, float deatht
                // clear selected player display\r
                ClearSelectedPlayer();\r
                // throw a weapon\r
-               SpawnThrownWeapon (self.origin + (self.mins + self.maxs) * 0.5, self.switchweapon);\r
+               SpawnThrownWeapon (self.origin + (self.mins + self.maxs) * 0.5, self.switchweapon, FALSE);\r
                // print an obituary message\r
                Obituary (attacker, inflictor, self, deathtype);\r
                race_PreDie();\r
@@ -758,7 +758,7 @@ void UpdateSelectedPlayer()
                if(!self.dropweapon_check)\r
                if(self.predator.team != self.team) // don't disarm team mates when swallowing them\r
                if(random() < cvar("g_balance_vore_swallow_dropweapon"))\r
-                       SpawnThrownWeapon (self.origin + (self.mins + self.maxs) * 0.5, self.switchweapon);\r
+                       SpawnThrownWeapon (self.origin + (self.mins + self.maxs) * 0.5, self.switchweapon, TRUE);\r
                self.dropweapon_check = TRUE;\r
        }\r
        else\r