Apply the chase_active cvar of the spectatee, not of the player that's spectated...
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Wed, 13 Jul 2011 15:24:23 +0000 (18:24 +0300)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Wed, 13 Jul 2011 15:24:23 +0000 (18:24 +0300)
data/qcsrc/server/cl_client.qc
data/qcsrc/server/cl_weaponsystem.qc

index eb74e49..2503070 100644 (file)
@@ -523,11 +523,14 @@ float Client_customizeentityforclient()
        // this is only visible to the prey however, otherwise players would appear as a floating stomach to everyone (ewww)\r
        stomachmodel = strcat(substring(self.playermodel, 0, strlen(self.playermodel) - 4), "_stomach.md3"); // 4 is the extension length\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
        // don't do this if we have chase_active enabled, as we'd be seeing a floating stomach from third person view\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 || other.fakepredator == self)\r
        {\r
                Client_setmodel(stomachmodel);\r
@@ -540,7 +543,7 @@ float Client_customizeentityforclient()
        self.effects &~= EF_NODEPTHTEST;\r
        if not(self.stat_eaten || self.fakeprey)\r
                self.alpha = default_player_alpha;\r
-       else if(cvar("g_vore_neighborprey_distance") && !self.fakeprey && (self.predator == other.predator || self.predator == other.fakepredator) && !(other.cvar_chase_active || other.classname == "observer"))\r
+       else if(cvar("g_vore_neighborprey_distance") && !self.fakeprey && (self.predator == other.predator || self.predator == other.fakepredator) && !(chase || other.classname == "observer"))\r
        {\r
                self.alpha = default_player_alpha; // allow seeing neighboring prey\r
                self.effects |= EF_NODEPTHTEST; // don't hide behind the stomach's own EF_NODEPTHTEST\r
index eed6d74..4a8ceaf 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