]> git.rm.cloudns.org Git - voretournament/voretournament.git/commitdiff
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 1ccdea5c979a0f7f2168529e268f87062dd8851e..702125d768da35fc2577ffdd187e688f9fbf818e 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 144ade6ecc2159ff99b96f90ade6c42e56cdb2a8..f6ae23fa4cfd090944635dd16a9f30de80ec48db 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 531f95d0b010784d7d112bf6f6eec44c07bc4979..7e22cf90b54c64c9c7b36b2c595454681d6efa12 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