Fix exterior weapon entities showing when they shouldn't. They should only be visible...
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Wed, 4 May 2011 12:03:21 +0000 (15:03 +0300)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Wed, 4 May 2011 12:03:21 +0000 (15:03 +0300)
data/qcsrc/server/cl_weaponsystem.qc

index 09cbacc..fdf09db 100644 (file)
@@ -266,7 +266,12 @@ float CL_ExteriorWeaponentity_CustomizeEntityForClient()
                return TRUE;\r
        }\r
 \r
-       setmodel(self, strcat("models/weapons/v_", self.owner.weaponname, ".md3"));\r
+       if(cvar("g_vore_neighborprey_distance") && (other.predator == self.owner.predator || other.fakepredator == self.owner.predator) && !(other.cvar_chase_active || other.classname == "observer"))\r
+               setmodel(self, strcat("models/weapons/v_", self.owner.weaponname, ".md3")); // show the weapon model of prey when in the same stomach as them and neighborprey is enabled\r
+       else if(self.owner.stat_eaten)\r
+               setmodel(self, ""); // hide the weapon model of prey\r
+       else\r
+               setmodel(self, strcat("models/weapons/v_", self.owner.weaponname, ".md3"));\r
        return TRUE;\r
 }\r
 \r