[nexuiz-commits] r7778 - in trunk/data: . qcsrc/server
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Mon Sep 14 01:45:18 EDT 2009
Author: div0
Date: 2009-09-14 01:45:17 -0400 (Mon, 14 Sep 2009)
New Revision: 7778
Modified:
trunk/data/defaultNexuiz.cfg
trunk/data/qcsrc/server/g_world.qc
Log:
antilag fix, possibly
Modified: trunk/data/defaultNexuiz.cfg
===================================================================
--- trunk/data/defaultNexuiz.cfg 2009-09-13 19:59:34 UTC (rev 7777)
+++ trunk/data/defaultNexuiz.cfg 2009-09-14 05:45:17 UTC (rev 7778)
@@ -432,6 +432,7 @@
pausable 0
seta g_spawnshieldtime 0.3 "number of seconds you are invincible after you spawned, this shield is lost after you fire"
seta g_antilag 2 "AntiLag (0 = no AntiLag, 1 = verified client side hit scan, 2 = server side hit scan in the past, 3 = unverified client side hit scan)"
+set g_antilag_nudge 0 "don't touch"
set g_antilag_bullets 1 "Bullets AntiLag (0 = no AntiLag, 1 = server side hit scan in the past) - DO NOT TOUCH (severely changes weapon balance)"
set g_shootfromclient 1 "let client decide if it has the gun left or right; if set to 2, center handedness is allowed, and defaulted to, too; see also cl_gunalign"
set g_shootfromeye 0 "shots are fired from your eye/crosshair; visual gun position can still be influenced by cl_gunalign 1 and 2"
Modified: trunk/data/qcsrc/server/g_world.qc
===================================================================
--- trunk/data/qcsrc/server/g_world.qc 2009-09-13 19:59:34 UTC (rev 7777)
+++ trunk/data/qcsrc/server/g_world.qc 2009-09-14 05:45:17 UTC (rev 7778)
@@ -2490,6 +2490,7 @@
void EndFrame()
{
+ float altime;
FOR_EACH_REALCLIENT(self)
{
if(self.classname == "spectator")
@@ -2507,15 +2508,17 @@
play2(self, "misc/hit.wav");
}
}
+ altime = time + frametime * (1 + cvar("g_antilag_nudge"));
+ // add 1 frametime because after this, engine SV_Physics
+ // increases time by a frametime and then networks the frame
+ // add another frametime because client shows everything with
+ // 1 frame of lag (cl_nolerp 0). The last +1 however should not be
+ // needed!
FOR_EACH_CLIENT(self)
{
self.hitsound = FALSE;
self.typehitsound = FALSE;
- antilag_record(self, time + 2*frametime);
- // add 1 frametime because after this, engine SV_Physics
- // increases time by a frametime and then networks the frame
- // add another frametime because client shows everything with
- // 1 frame of lag (cl_nolerp 0).
+ antilag_record(self, altime);
}
}
More information about the nexuiz-commits
mailing list