X-Git-Url: http://de.git.xonotic.org/?p=voretournament%2Fvoretournament.git;a=blobdiff_plain;f=data%2Fqcsrc%2Fserver%2Fvore.qc;h=74a6fb1e8e806ea58160d74181e885bf2932756a;hp=8dcdb92a02ebd4efc1e4d23d2cf8c391e3f9852d;hb=b8f765f8adeb0dccfd9507d7e93299312fcfc45b;hpb=d567cf82d61f1c854b7824c52c506fba36269411 diff --git a/data/qcsrc/server/vore.qc b/data/qcsrc/server/vore.qc index 8dcdb92a..74a6fb1e 100644 --- a/data/qcsrc/server/vore.qc +++ b/data/qcsrc/server/vore.qc @@ -1,4 +1,3 @@ -float vore_frametime; .float regurgitate_prepare; .float stomachkick_delay, system_delay, action_delay, digest_button_delay_time, regurgitate_button_delay_time; .float complain_vore; @@ -22,7 +21,10 @@ entity Swallow_player_check() vore_w_shotorg = self.origin; vore_w_shotdir = v_forward; - WarpZone_traceline_antilag(self, vore_w_shotorg, vore_w_shotorg + vore_w_shotdir * swallow_range, FALSE, self, ANTILAG_LATENCY(self)); + if(self.antilag_debug) + WarpZone_traceline_antilag(self, vore_w_shotorg, vore_w_shotorg + vore_w_shotdir * swallow_range, FALSE, self, self.antilag_debug); + else + WarpZone_traceline_antilag(self, vore_w_shotorg, vore_w_shotorg + vore_w_shotdir * swallow_range, FALSE, self, ANTILAG_LATENCY(self)); if(trace_fraction < 1) if(trace_ent.classname == "player") return trace_ent; @@ -660,14 +662,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 +765,24 @@ void Vore() // Code that addresses predators: // -------------------------------- - entity prey; - prey = Swallow_player_check(); + // only scan prey between server frames, else we get major breakage in multiplayer and jitter + if(!frametime) + self.prey = Swallow_player_check(); // 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