Use a different, and very weird solution for the prey scan issue in multiplayer....
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Sat, 16 Jul 2011 14:08:02 +0000 (17:08 +0300)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Sat, 16 Jul 2011 14:08:02 +0000 (17:08 +0300)
data/qcsrc/server/vore.qc

index 798b5cf..74a6fb1 100644 (file)
@@ -1,4 +1,3 @@
-.float vore_frametime;\r
 .float regurgitate_prepare;\r
 .float stomachkick_delay, system_delay, action_delay, digest_button_delay_time, regurgitate_button_delay_time;\r
 .float complain_vore;\r
@@ -22,7 +21,10 @@ entity Swallow_player_check()
        vore_w_shotorg = self.origin;\r
        vore_w_shotdir = v_forward;\r
 \r
-       WarpZone_traceline_antilag(self, vore_w_shotorg, vore_w_shotorg + vore_w_shotdir * swallow_range, FALSE, self, ANTILAG_LATENCY(self));\r
+       if(self.antilag_debug)\r
+               WarpZone_traceline_antilag(self, vore_w_shotorg, vore_w_shotorg + vore_w_shotdir * swallow_range, FALSE, self, self.antilag_debug);\r
+       else\r
+               WarpZone_traceline_antilag(self, vore_w_shotorg, vore_w_shotorg + vore_w_shotdir * swallow_range, FALSE, self, ANTILAG_LATENCY(self));\r
        if(trace_fraction < 1)\r
        if(trace_ent.classname == "player")\r
                return trace_ent;\r
@@ -763,12 +765,9 @@ void Vore()
 // Code that addresses predators:\r
 // --------------------------------\r
 \r
-       // only scan prey each server frame, else we get major breakage in multiplayer\r
-       if(self.vore_frametime <= time)\r
-       {\r
+       // only scan prey between server frames, else we get major breakage in multiplayer and jitter\r
+       if(!frametime)\r
                self.prey = Swallow_player_check();\r
-               self.vore_frametime = time + sys_frametime;\r
-       }\r
 \r
        // attempt to swallow our new prey if we pressed the attack button, and there's any in range\r
        self.stat_canswallow = 0;\r