]> de.git.xonotic.org Git - voretournament/voretournament.git/commitdiff
Remove the feature to keep dead prey in the belly, as it will be replaced by an upcom...
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Sun, 31 Jul 2011 17:12:46 +0000 (20:12 +0300)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Sun, 31 Jul 2011 17:12:46 +0000 (20:12 +0300)
data/defaultVT.cfg
data/qcsrc/server/cl_client.qc
data/qcsrc/server/cl_player.qc
data/qcsrc/server/cl_weaponsystem.qc
data/qcsrc/server/vore.qc
data/qcsrc/server/vore.qh

index 8581592c9dbfb3e7e38fdfdf6f7a56ef54c04da2..5a76b69c28a6cda9f5a26976ae3a2b6f891d7fdf 100644 (file)
@@ -1602,7 +1602,6 @@ set g_vore_regurgitatecolor_color_normal "0.6 0.4 0" "the color players will hav
 set g_vore_regurgitatecolor_color_digest "0.3 0.15 0" "the color players will have when regurgitated after having been digested"\r
 set g_vore_regurgitatecolor_fade 0.01 "how quickly the regurgitation color washes off players once they leave the stomach, does not apply to dead bodies"\r
 set g_vore_regurgitatecolor_particles 0.75 "players who are dirty from regurgitation generate particles this often, based on the amount of goo they have on them"\r
-set g_vore_keepdeadprey 0.75 "If enabled, prey remains in the stomach after dying, else the predator throws up their dead body. 0 = disabled, 1 = ernabled, anything between = probability"\r
 set g_vore_neighborprey_distance 8 "Distance by which prey inside the same stomach are positioned away from each other. 0 disables seeing neighboring prey"\r
 set g_vore_neighborprey_scale 1 "When neighborprey is enabled, all prey is resized by this amount"\r
 set g_vore_swallowmodel_range 100 "Distance by which the swallow model oscillates based on swallow progress"\r
index abe750324a8ec1bd2311e0b8480b936b657a611c..d735eb09a5d62ee3f6b47db377de81b23262d424 100644 (file)
@@ -531,7 +531,7 @@ float Client_customizeentityforclient()
 \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(chase || other.classname == "observer") // the observer check prevents a bug\r
-       if(other.predator == self || other.fakepredator == self)\r
+       if(other.predator == self)\r
        {\r
                Client_setmodel(stomachmodel);\r
                self.effects |= EF_NODEPTHTEST; // don't hide behind walls\r
@@ -541,9 +541,9 @@ float Client_customizeentityforclient()
 \r
        Client_setmodel(setmodel_state());\r
        self.effects &~= EF_NODEPTHTEST;\r
-       if not(self.stat_eaten || self.fakeprey)\r
+       if not(self.stat_eaten)\r
                self.alpha = default_player_alpha;\r
-       else if(cvar("g_vore_neighborprey_distance") && !self.fakeprey && (self.predator == other.predator || self.predator == other.fakepredator) && !(chase || other.classname == "observer"))\r
+       else if(cvar("g_vore_neighborprey_distance") && self.predator == other.predator && !(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
@@ -846,8 +846,7 @@ void PutClientInServer (void)
 \r
                RemoveGrabber(self); // Wazat's Grabber\r
 \r
-               Vore_DeadPrey_Detach(self);\r
-               self.fakeprey = FALSE; // clear the fakeprey status\r
+               Vore_Disconnect();\r
                self.swallow_progress_pred = self.swallow_progress_prey = 0;\r
 \r
                self.classname = "player";\r
@@ -1692,7 +1691,7 @@ void ChatBubbleThink()
                remove(self);\r
                return;\r
        }\r
-       if ((self.owner.BUTTON_CHAT && !self.owner.deadflag && !self.owner.stat_eaten && self.owner.fakepredator.classname != "player")\r
+       if ((self.owner.BUTTON_CHAT && !self.owner.deadflag && !self.owner.stat_eaten)\r
 #ifdef TETRIS\r
                || self.owner.tetris_on\r
 #endif\r
index 411499c4c9e3af876f7418628526183bd6fe549c..1e9f8d438e8d2165cc33257dd43ded389cd5d7a2 100644 (file)
@@ -104,8 +104,6 @@ void WeaponStats_LogKill(float awep, float vwep)
 void CopyBody(float keepvelocity)\r
 {\r
        local entity oldself;\r
-       if (self.fakeprey)\r
-               return;\r
        if (self.effects & EF_NODRAW || self.alpha < 0)\r
                return;\r
        oldself = self;\r
index bc2cb52f5f546a4d4bfc3c06d5e8e170b1be166e..e76ebbf111e7a4b93cee22eb446d6d2b747f4a11 100644 (file)
@@ -263,7 +263,7 @@ float CL_ExteriorWeaponentity_CustomizeEntityForClient()
                other = other.enemy; // also do this for the player we are spectating\r
 \r
        if not(chase || other.classname == "observer") // the observer check prevents a bug\r
-       if(other.predator == self.owner || other.fakepredator == self.owner)\r
+       if(other.predator == self.owner)\r
        {\r
                setmodel(self, "");\r
                return TRUE;\r
@@ -272,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) && !(chase || other.classname == "observer"))\r
+       else if(cvar("g_vore_neighborprey_distance") && other.predator == 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
index d043c041ec02871053f457508dd66ec30652c6a9..274dae6a4ad3b90aed8cfcd558118b6cc20464af 100644 (file)
@@ -400,77 +400,20 @@ void Vore_Regurgitate(entity e)
        e.predator = world;\r
 }\r
 \r
-void Vore_DeadPrey_Configure(entity e)\r
-{\r
-       // ran when the keepdeadprey feature is enabled and prey stays inside the stomach after dying\r
-\r
-       if(e.fakeprey || !e.stat_eaten) // we already configured everything\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
-       Vore_SetPreyPositions(e.predator);\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
-       e.predator = world;\r
-\r
-       // now put our dead prey inside the predator's stomach, but only as an effect\r
-       e.movetype = MOVETYPE_FOLLOW;\r
-       e.takedamage = DAMAGE_NO;\r
-       e.solid = SOLID_NOT;\r
-       e.aiment = e.fakepredator;\r
-}\r
-\r
-void Vore_DeadPrey_Detach(entity e)\r
-{\r
-       // ran when dead prey must be detached from the stomach (eg: they are respawning)\r
-       // should only execute after Vore_DeadPrey_Configure has ran first\r
-\r
-       if not(cvar("g_vore_keepdeadprey"))\r
-               return;\r
-\r
-       e.fakepredator = world;\r
-       e.fakeprey = TRUE; // keep fakeprey status\r
-       e.stat_eaten = 0;\r
-       e.aiment = world;\r
-       e.movetype = MOVETYPE_TOSS;\r
-}\r
-\r
-void Vore_PreyRelease(entity e, float pred_disconnect)\r
-{\r
-       if(pred_disconnect)\r
-       {\r
-               if(e.fakeprey)\r
-                       Vore_DeadPrey_Detach(e);\r
-               else\r
-                       Vore_Regurgitate(e);\r
-       }\r
-       else if(self.stat_eaten && !self.fakeprey)\r
-       {\r
-               // if the keepdeadprey feature is on, don't spit a dead prey's carcass out\r
-               if(e.deadflag != DEAD_NO && random() < cvar("g_vore_keepdeadprey"))\r
-                       Vore_DeadPrey_Configure(e);\r
-               else\r
-                       Vore_Regurgitate(e);\r
-       }\r
-}\r
-\r
 void Vore_Disconnect()\r
 {\r
        // frees prey from their predators when someone disconnects or goes spectating, or in other circumstances\r
 \r
        // prey disconnects or goes spectating while inside someone's belly\r
        if(self.stat_eaten)\r
-               Vore_PreyRelease(self, TRUE);\r
+               Vore_Regurgitate(self);\r
 \r
        // pred disconnects or goes spectating with players in their belly\r
        entity head;\r
        FOR_EACH_PLAYER(head)\r
        {\r
-               if(head.predator == self || head.fakepredator == self)\r
-                       Vore_PreyRelease(head, TRUE);\r
+               if(head.predator == self)\r
+                       Vore_Regurgitate(head);\r
        }\r
        Vore_GurgleSound(); // stop the gurgling sound\r
 \r
@@ -703,9 +646,7 @@ void Vore()
 \r
        // set all vore stats\r
        Vore_SetSbarRings();\r
-       if(self.fakepredator.classname == "player")\r
-               self.stat_eaten = num_for_edict(self.fakepredator);\r
-       else if(self.predator.classname == "player")\r
+       if(self.predator.classname == "player")\r
        {\r
                self.stat_stomachload = self.predator.stomach_load; // necessary for the stomach board\r
                self.stat_stomachmaxload = self.predator.stomach_maxload; // necessary for the stomach board\r
@@ -858,13 +799,10 @@ void Vore()
 \r
        if(self.deadflag != DEAD_NO) // we're dead, do what we must\r
        {\r
-               Vore_PreyRelease(self, FALSE);\r
+               Vore_Regurgitate(self);\r
                return;\r
        }\r
 \r
-       if(self.fakeprey) // detach dead prey if their predator died or got eaten\r
-       if(self.fakepredator.deadflag != DEAD_NO || self.fakepredator.stat_eaten)\r
-               Vore_DeadPrey_Detach(self);\r
        if(self.predator.deadflag != DEAD_NO) // do we want to be in a dead furry x_x\r
        {\r
                Vore_Regurgitate(self);\r
index 30989cae044c869f3d259f1ede30595d65085efa..93b92996c5e260648cb2645a2401adb9a0f88d90 100644 (file)
@@ -1,7 +1,6 @@
 void Vore();\r
 void Vore_Regurgitate(entity e);\r
 void Vore_Disconnect();\r
-void Vore_DeadPrey_Detach(entity e);\r
 \r
 entity Swallow_player_check();\r
 float Swallow_condition_check(entity prey);
\ No newline at end of file