Don't hide the predator's stomach model behind walls. This fixes walls showing throug...
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Mon, 11 Jul 2011 00:24:05 +0000 (03:24 +0300)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Mon, 11 Jul 2011 00:24:05 +0000 (03:24 +0300)
data/qcsrc/server/cl_client.qc
data/qcsrc/server/cl_weaponsystem.qc
data/qcsrc/server/vore.qc

index 1ccdea5..702125d 100644 (file)
@@ -531,15 +531,20 @@ float Client_customizeentityforclient()
        if(other.predator == self || other.fakepredator == self)\r
        {\r
                Client_setmodel(stomachmodel);\r
+               self.effects |= EF_NODEPTHTEST; // don't hide behind walls\r
                self.alpha = other.cvar_cl_vore_stomachmodel;\r
                return TRUE;\r
        }\r
 \r
        Client_setmodel(setmodel_state());\r
+       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
+       {\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
+       }\r
        else\r
                self.alpha = -1; // hide prey\r
        return TRUE;\r
index 144ade6..f6ae23f 100644 (file)
@@ -266,10 +266,14 @@ float CL_ExteriorWeaponentity_CustomizeEntityForClient()
                return TRUE;\r
        }\r
 \r
+       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
+       {\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
+       }\r
        else\r
                setmodel(self, ""); // hide prey's weapon model\r
        return TRUE;\r
index 531f95d..7e22cf9 100644 (file)
@@ -235,6 +235,7 @@ void Vore_SwallowModel_Update(entity prey, entity pred)
                // apply the properties of the prey\r
                prey.swallow_model.viewmodelforclient = prey; // use the same system as the weapon model\r
                //prey.swallow_model.effects |= EF_NOGUNBOB; // let it bob\r
+               prey.swallow_model.effects |= EF_NODEPTHTEST; // don't hide behind walls\r
                prey.swallow_model.colormap = prey.colormap; // pants and shirt color\r
                prey.swallow_model.glowmod = prey.glowmod; // glow color\r
 \r