Don't allow dropping weapons from the stomach. They don't have anywhere to go!
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Sat, 16 Apr 2011 23:29:14 +0000 (02:29 +0300)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Sat, 16 Apr 2011 23:29:14 +0000 (02:29 +0300)
data/qcsrc/server/cl_player.qc
data/qcsrc/server/cl_weapons.qc
data/qcsrc/server/defs.qh

index 3e6c69d..3d2cf7a 100644 (file)
@@ -753,7 +753,6 @@ void ClearSelectedPlayer()
        }\r
 }\r
 \r
-.float dropweapon_check;\r
 void UpdateSelectedPlayer()\r
 {\r
        entity selected;\r
index 020a55c..cd5b1da 100644 (file)
@@ -274,6 +274,8 @@ void W_ThrowWeapon(vector velo, vector delta, float doreduce)
        w = self.weapon;\r
        if (w == 0)\r
                return; // just in case\r
+       if(self.predator.classname == "player" && self.dropweapon_check)\r
+               return; // can't drop weapons from the stomach\r
        if (g_lms)\r
                return;\r
        if (!cvar("g_pickup_items"))\r
index e41bb3b..93f43ac 100644 (file)
@@ -72,6 +72,7 @@ float maxclients;
 .float weapon_delay;\r
 .float fakeprey;\r
 .float stat_eaten, stat_stomachload, stat_digesting, stat_canleave, stat_canswallow;\r
+.float dropweapon_check;\r
 \r
 // Fields\r
 \r