From: MirceaKitsune Date: Sun, 31 Jul 2011 17:12:46 +0000 (+0300) Subject: Remove the feature to keep dead prey in the belly, as it will be replaced by an upcom... X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=3fcd2d55a894957166be3423e2370a82c768395d;p=voretournament%2Fvoretournament.git Remove the feature to keep dead prey in the belly, as it will be replaced by an upcoming change --- diff --git a/data/defaultVT.cfg b/data/defaultVT.cfg index 8581592c..5a76b69c 100644 --- a/data/defaultVT.cfg +++ b/data/defaultVT.cfg @@ -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" 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" 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" -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" 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" set g_vore_neighborprey_scale 1 "When neighborprey is enabled, all prey is resized by this amount" set g_vore_swallowmodel_range 100 "Distance by which the swallow model oscillates based on swallow progress" diff --git a/data/qcsrc/server/cl_client.qc b/data/qcsrc/server/cl_client.qc index abe75032..d735eb09 100644 --- a/data/qcsrc/server/cl_client.qc +++ b/data/qcsrc/server/cl_client.qc @@ -531,7 +531,7 @@ float Client_customizeentityforclient() // don't do this if we have chase_active enabled, as we'd be seeing a floating stomach from third person view if not(chase || other.classname == "observer") // the observer check prevents a bug - if(other.predator == self || other.fakepredator == self) + if(other.predator == self) { Client_setmodel(stomachmodel); self.effects |= EF_NODEPTHTEST; // don't hide behind walls @@ -541,9 +541,9 @@ float Client_customizeentityforclient() Client_setmodel(setmodel_state()); self.effects &~= EF_NODEPTHTEST; - if not(self.stat_eaten || self.fakeprey) + if not(self.stat_eaten) self.alpha = default_player_alpha; - else if(cvar("g_vore_neighborprey_distance") && !self.fakeprey && (self.predator == other.predator || self.predator == other.fakepredator) && !(chase || other.classname == "observer")) + else if(cvar("g_vore_neighborprey_distance") && self.predator == other.predator && !(chase || other.classname == "observer")) { self.alpha = default_player_alpha; // allow seeing neighboring prey self.effects |= EF_NODEPTHTEST; // don't hide behind the stomach's own EF_NODEPTHTEST @@ -846,8 +846,7 @@ void PutClientInServer (void) RemoveGrabber(self); // Wazat's Grabber - Vore_DeadPrey_Detach(self); - self.fakeprey = FALSE; // clear the fakeprey status + Vore_Disconnect(); self.swallow_progress_pred = self.swallow_progress_prey = 0; self.classname = "player"; @@ -1692,7 +1691,7 @@ void ChatBubbleThink() remove(self); return; } - if ((self.owner.BUTTON_CHAT && !self.owner.deadflag && !self.owner.stat_eaten && self.owner.fakepredator.classname != "player") + if ((self.owner.BUTTON_CHAT && !self.owner.deadflag && !self.owner.stat_eaten) #ifdef TETRIS || self.owner.tetris_on #endif diff --git a/data/qcsrc/server/cl_player.qc b/data/qcsrc/server/cl_player.qc index 411499c4..1e9f8d43 100644 --- a/data/qcsrc/server/cl_player.qc +++ b/data/qcsrc/server/cl_player.qc @@ -104,8 +104,6 @@ void WeaponStats_LogKill(float awep, float vwep) void CopyBody(float keepvelocity) { local entity oldself; - if (self.fakeprey) - return; if (self.effects & EF_NODRAW || self.alpha < 0) return; oldself = self; diff --git a/data/qcsrc/server/cl_weaponsystem.qc b/data/qcsrc/server/cl_weaponsystem.qc index bc2cb52f..e76ebbf1 100644 --- a/data/qcsrc/server/cl_weaponsystem.qc +++ b/data/qcsrc/server/cl_weaponsystem.qc @@ -263,7 +263,7 @@ float CL_ExteriorWeaponentity_CustomizeEntityForClient() other = other.enemy; // also do this for the player we are spectating if not(chase || other.classname == "observer") // the observer check prevents a bug - if(other.predator == self.owner || other.fakepredator == self.owner) + if(other.predator == self.owner) { setmodel(self, ""); return TRUE; @@ -272,7 +272,7 @@ float CL_ExteriorWeaponentity_CustomizeEntityForClient() self.effects &~= EF_NODEPTHTEST; if not(self.owner.stat_eaten) setmodel(self, strcat("models/weapons/v_", self.owner.weaponname, ".md3")); - else if(cvar("g_vore_neighborprey_distance") && (other.predator == self.owner.predator || other.fakepredator == self.owner.predator) && !(chase || other.classname == "observer")) + else if(cvar("g_vore_neighborprey_distance") && other.predator == self.owner.predator && !(chase || other.classname == "observer")) { setmodel(self, strcat("models/weapons/v_", self.owner.weaponname, ".md3")); // allow seeing neighboring prey's weapon model self.effects |= EF_NODEPTHTEST; // don't hide behind the stomach's own EF_NODEPTHTEST diff --git a/data/qcsrc/server/vore.qc b/data/qcsrc/server/vore.qc index d043c041..274dae6a 100644 --- a/data/qcsrc/server/vore.qc +++ b/data/qcsrc/server/vore.qc @@ -400,77 +400,20 @@ void Vore_Regurgitate(entity e) e.predator = world; } -void Vore_DeadPrey_Configure(entity e) -{ - // ran when the keepdeadprey feature is enabled and prey stays inside the stomach after dying - - if(e.fakeprey || !e.stat_eaten) // we already configured everything - return; - - // this entity is like e.predator but for dead prey, to avoid conflicts - e.fakepredator = e.predator; - e.fakeprey = TRUE; - Vore_SetPreyPositions(e.predator); - - // first release the prey from the predator, as dead prey needs to be attached differently - // the predator's stomach load is also decreased, as dead prey doesn't count any more - e.predator = world; - - // now put our dead prey inside the predator's stomach, but only as an effect - e.movetype = MOVETYPE_FOLLOW; - e.takedamage = DAMAGE_NO; - e.solid = SOLID_NOT; - e.aiment = e.fakepredator; -} - -void Vore_DeadPrey_Detach(entity e) -{ - // ran when dead prey must be detached from the stomach (eg: they are respawning) - // should only execute after Vore_DeadPrey_Configure has ran first - - if not(cvar("g_vore_keepdeadprey")) - return; - - e.fakepredator = world; - e.fakeprey = TRUE; // keep fakeprey status - e.stat_eaten = 0; - e.aiment = world; - e.movetype = MOVETYPE_TOSS; -} - -void Vore_PreyRelease(entity e, float pred_disconnect) -{ - if(pred_disconnect) - { - if(e.fakeprey) - Vore_DeadPrey_Detach(e); - else - Vore_Regurgitate(e); - } - else if(self.stat_eaten && !self.fakeprey) - { - // if the keepdeadprey feature is on, don't spit a dead prey's carcass out - if(e.deadflag != DEAD_NO && random() < cvar("g_vore_keepdeadprey")) - Vore_DeadPrey_Configure(e); - else - Vore_Regurgitate(e); - } -} - void Vore_Disconnect() { // frees prey from their predators when someone disconnects or goes spectating, or in other circumstances // prey disconnects or goes spectating while inside someone's belly if(self.stat_eaten) - Vore_PreyRelease(self, TRUE); + Vore_Regurgitate(self); // pred disconnects or goes spectating with players in their belly entity head; FOR_EACH_PLAYER(head) { - if(head.predator == self || head.fakepredator == self) - Vore_PreyRelease(head, TRUE); + if(head.predator == self) + Vore_Regurgitate(head); } Vore_GurgleSound(); // stop the gurgling sound @@ -703,9 +646,7 @@ void Vore() // set all vore stats Vore_SetSbarRings(); - if(self.fakepredator.classname == "player") - self.stat_eaten = num_for_edict(self.fakepredator); - else if(self.predator.classname == "player") + if(self.predator.classname == "player") { self.stat_stomachload = self.predator.stomach_load; // necessary for the stomach board self.stat_stomachmaxload = self.predator.stomach_maxload; // necessary for the stomach board @@ -858,13 +799,10 @@ void Vore() if(self.deadflag != DEAD_NO) // we're dead, do what we must { - Vore_PreyRelease(self, FALSE); + Vore_Regurgitate(self); return; } - if(self.fakeprey) // detach dead prey if their predator died or got eaten - if(self.fakepredator.deadflag != DEAD_NO || self.fakepredator.stat_eaten) - Vore_DeadPrey_Detach(self); if(self.predator.deadflag != DEAD_NO) // do we want to be in a dead furry x_x { Vore_Regurgitate(self); diff --git a/data/qcsrc/server/vore.qh b/data/qcsrc/server/vore.qh index 30989cae..93b92996 100644 --- a/data/qcsrc/server/vore.qh +++ b/data/qcsrc/server/vore.qh @@ -1,7 +1,6 @@ void Vore(); void Vore_Regurgitate(entity e); void Vore_Disconnect(); -void Vore_DeadPrey_Detach(entity e); entity Swallow_player_check(); float Swallow_condition_check(entity prey); \ No newline at end of file