From b85df7f97555346a23b005337cd0977d83ee374a Mon Sep 17 00:00:00 2001 From: MirceaKitsune Date: Sat, 16 Jul 2011 14:02:47 +0300 Subject: [PATCH] Fully fix the multiplayer swallowing issue, which will also fix the local jitter when trying to swallow prey --- data/qcsrc/server/vore.qc | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) 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 -- 2.39.2