From: MirceaKitsune Date: Tue, 19 Apr 2011 16:22:20 +0000 (+0300) Subject: Fix a big issue with my probability deadprey check X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=a7830612dea07dba0e84886649d8d522c9954b24;p=voretournament%2Fvoretournament.git Fix a big issue with my probability deadprey check --- diff --git a/data/qcsrc/server/vore.qc b/data/qcsrc/server/vore.qc index 8566f150..9e6a5f94 100644 --- a/data/qcsrc/server/vore.qc +++ b/data/qcsrc/server/vore.qc @@ -317,20 +317,21 @@ void Vore_DeadPrey_Detach(entity e) void Vore_PreyRelease(entity e, float pred_disconnect) { - // 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")) + if(pred_disconnect) { - // if keepdeadprey is enabled and the predator disconnected, detach the dead prey - if(pred_disconnect) - { - if(e.fakeprey) - Vore_DeadPrey_Detach(e); - } + if(e.fakeprey) + Vore_DeadPrey_Detach(e); else - Vore_DeadPrey_Configure(e); + Vore_Regurgitate(e); } else - Vore_Regurgitate(e); + { + // 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()