From: MirceaKitsune Date: Sat, 16 Jul 2011 11:02:47 +0000 (+0300) Subject: Fully fix the multiplayer swallowing issue, which will also fix the local jitter... X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=b85df7f97555346a23b005337cd0977d83ee374a;p=voretournament%2Fvoretournament.git Fully fix the multiplayer swallowing issue, which will also fix the local jitter when trying to swallow prey --- diff --git a/data/qcsrc/server/vore.qc b/data/qcsrc/server/vore.qc index 8dcdb92a..3910e8ed 100644 --- a/data/qcsrc/server/vore.qc +++ b/data/qcsrc/server/vore.qc @@ -660,14 +660,11 @@ void Vore_SetSbarRings() } } +.entity prey; void Vore() { // main vore code, this is where it all happens - if(vore_frametime > time) //account system frametime - return; - vore_frametime = time + sys_frametime; - Vore_AutoTaunt(); // wash the goo away from players once they leave the stomach @@ -766,23 +763,26 @@ void Vore() // Code that addresses predators: // -------------------------------- - entity prey; - prey = Swallow_player_check(); + if(vore_frametime <= time) //account system frametime + { + self.prey = Swallow_player_check(); + vore_frametime = time + sys_frametime; + } // attempt to swallow our new prey if we pressed the attack button, and there's any in range self.stat_canswallow = 0; - if(Swallow_condition_check(prey)) + if(Swallow_condition_check(self.prey)) { // canswallow stat, used by the HUD - if(teams_matter && prey.team == self.team) + if(teams_matter && self.prey.team == self.team) self.stat_canswallow = 2; else self.stat_canswallow = 1; if(self.BUTTON_ATCK) - Vore_SwallowStep(prey); + Vore_SwallowStep(self.prey); } - else if(prey != world) + else if(self.prey != world) self.stat_canswallow = -1; // toggle digestion, if the player has someone in their stomach