Finally, remove the last known bugs, and nail the last known issues in the fulldigest...
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Sun, 27 Feb 2011 18:21:47 +0000 (20:21 +0200)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Sun, 27 Feb 2011 18:21:47 +0000 (20:21 +0200)
data/qcsrc/server/cl_client.qc
data/qcsrc/server/cl_player.qc
data/qcsrc/server/defs.qh
data/qcsrc/server/vore.qc

index 47f2749..fe30cae 100644 (file)
@@ -516,7 +516,7 @@ float Client_customizeentityforclient()
        if(other.cvar_chase_active > 0 || other.classname == "observer") // the classname check prevents a bug\r
        {\r
                Client_setmodel(setmodel_state());\r
-               if not(self.predator.classname == "player" || self.fakepredator.classname == "player")\r
+               if not(self.predator.classname == "player" || self.fakeprey)\r
                        self.alpha = default_player_alpha;\r
                return TRUE;\r
        }\r
@@ -530,7 +530,7 @@ float Client_customizeentityforclient()
                return TRUE;\r
        }\r
        Client_setmodel(setmodel_state());\r
-       if not(self.predator.classname == "player" || self.fakepredator.classname == "player")\r
+       if not(self.predator.classname == "player" || self.fakeprey)\r
                self.alpha = default_player_alpha;\r
        return TRUE;\r
 }\r
@@ -828,8 +828,6 @@ void PutClientInServer (void)
 \r
                RemoveGrabber(self); // Wazat's Grabber\r
 \r
-               Vore_DeadPrey_Detach(self);\r
-\r
                self.classname = "player";\r
                self.wasplayer = TRUE;\r
                self.iscreature = TRUE;\r
@@ -924,6 +922,8 @@ void PutClientInServer (void)
 \r
                SetCustomizer(self, Client_customizeentityforclient, Client_uncustomizeentityforclient);\r
 \r
+               Vore_DeadPrey_Detach(self);\r
+\r
                self.model = "";\r
                FixPlayermodel();\r
 \r
index af48331..120c6d2 100644 (file)
@@ -104,7 +104,7 @@ void WeaponStats_LogKill(float awep, float vwep)
 void CopyBody(float keepvelocity)\r
 {\r
        local entity oldself;\r
-       if (self.fakepredator.classname == "player")\r
+       if (self.fakeprey)\r
                return;\r
        if (self.effects & EF_NODRAW || self.alpha < 0)\r
                return;\r
index f175727..d1834f6 100644 (file)
@@ -70,6 +70,7 @@ float maxclients;
 .float digesting;\r
 .float stomach_load;\r
 .float weapon_delay;\r
+.float fakeprey;\r
 .float stat_eaten, stat_stomachload, stat_digesting, stat_canleave;\r
 \r
 // Fields\r
index f8f9863..c29dc25 100644 (file)
@@ -231,11 +231,12 @@ void Vore_DeadPrey_Configure(entity e)
 {\r
        // ran when the fulldigest feature is enabled and prey stays inside the stomach after dying\r
 \r
-       if(e.fakepredator.classname == "player" || e.predator.classname != "player") // already configured\r
+       if(e.fakeprey || e.predator.classname != "player") // already configured\r
                return;\r
 \r
        // this entity is like e.predator but for dead prey, to avoid conflicts\r
        e.fakepredator = e.predator;\r
+       e.fakeprey = TRUE;\r
 \r
        // first release the prey from the predator, as dead prey needs to be attached differently\r
        // the predator's stomach load is also decreased, as dead prey doesn't count any more\r
@@ -251,7 +252,6 @@ void Vore_DeadPrey_Configure(entity e)
 \r
        // completely remove the dead body\r
        e.alpha = -1;\r
-       setmodel(e, "");\r
 }\r
 \r
 void Vore_DeadPrey_Detach(entity e)\r
@@ -264,6 +264,9 @@ void Vore_DeadPrey_Detach(entity e)
 \r
        e.fakepredator = world;\r
        e.aiment = world;\r
+\r
+       if(!e.deadflag)\r
+               e.fakeprey = FALSE;\r
 }\r
 \r
 void Vore_PreyRelease(entity e)\r