]> git.xonotic.org Git - voretournament/voretournament.git/blobdiff - data/qcsrc/server/cl_weaponsystem.qc
Apply the chase_active cvar of the spectatee, not of the player that's spectated...
[voretournament/voretournament.git] / data / qcsrc / server / cl_weaponsystem.qc
index eed6d74cd837b3c1d5ff6608374f29f78882b018..4a8ceaffab5ee0de7b77c8f88596812374cfa314 100644 (file)
@@ -256,10 +256,13 @@ float CL_ExteriorWeaponentity_CustomizeEntityForClient()
        if(self.owner.weaponname == "" || self.owner.deadflag != DEAD_NO)\r
                return TRUE;\r
 \r
+       float chase;\r
+       chase = other.cvar_chase_active;\r
+\r
        if(other.spectatee_status && other.spectatee_status == num_for_edict(other.enemy))\r
                other = other.enemy; // also do this for the player we are spectating\r
 \r
-       if not(other.cvar_chase_active || other.classname == "observer") // the observer check prevents a bug\r
+       if not(chase || other.classname == "observer") // the observer check prevents a bug\r
        if(other.predator == self.owner || other.fakepredator == self.owner)\r
        {\r
                setmodel(self, "");\r
@@ -269,7 +272,7 @@ float CL_ExteriorWeaponentity_CustomizeEntityForClient()
        self.effects &~= EF_NODEPTHTEST;\r
        if not(self.owner.stat_eaten)\r
                setmodel(self, strcat("models/weapons/v_", self.owner.weaponname, ".md3"));\r
-       else if(cvar("g_vore_neighborprey_distance") && (other.predator == self.owner.predator || other.fakepredator == self.owner.predator) && !(other.cvar_chase_active || other.classname == "observer"))\r
+       else if(cvar("g_vore_neighborprey_distance") && (other.predator == self.owner.predator || other.fakepredator == self.owner.predator) && !(chase || other.classname == "observer"))\r
        {\r
                setmodel(self, strcat("models/weapons/v_", self.owner.weaponname, ".md3")); // allow seeing neighboring prey's weapon model\r
                self.effects |= EF_NODEPTHTEST; // don't hide behind the stomach's own EF_NODEPTHTEST\r