From: MirceaKitsune Date: Sun, 27 Feb 2011 15:49:47 +0000 (+0200) Subject: Remove some useless code and fix a bug X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=398f49c9866591dec2123027d98fbe9f2eed2c3f;p=voretournament%2Fvoretournament.git Remove some useless code and fix a bug --- diff --git a/data/qcsrc/server/vore.qc b/data/qcsrc/server/vore.qc index 23e66d44..f30e29a1 100644 --- a/data/qcsrc/server/vore.qc +++ b/data/qcsrc/server/vore.qc @@ -257,31 +257,15 @@ void Vore_DeadPrey_Detach(entity e) { // ran when dead prey must be detached from the stomach (eg: they are respawning) - if(e.fakepredator.classname != "player") - return; - - e.movetype = e.vore_oldmovetype; - e.view_ofs_z = PL_VIEW_OFS_z; - e.alpha = default_player_alpha; - - // if we disconnect dead prey from the predator, gib it's body - if(e.health <= 0) - e.health = -1000; - e.fakepredator = world; + e.aiment = world; } void Vore_ChoosePreyRelease(entity e) { // if the fulldigest feature is on, we don't spit a dead prey's carcass out if(e.health <= 0 && cvar("g_vore_fulldigest")) - { Vore_DeadPrey_Configure(e); - - // if the predator's dead, we detach the dead prey from him - if(e.fakepredator.deadflag != DEAD_NO) - Vore_DeadPrey_Detach(e); - } else Vore_Regurgitate(e); } @@ -519,10 +503,17 @@ void Vore() if(self.deadflag) { Vore_ChoosePreyRelease(self); + + // if the predator's dead, we detach the dead prey from him + if(self.fakepredator.classname != "player" || self.fakepredator.deadflag != DEAD_NO) + Vore_DeadPrey_Detach(self); + return; } + if(self.predator.classname != "player") return; + if(self.predator.deadflag) Vore_Regurgitate(self); else if(vlen(self.predator.velocity) > cvar("g_balance_vore_regurgitate_speedcap"))