[nexuiz-commits] r7803 - in branches/nexuiz-2.0: . data data/qcsrc/server
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Tue Sep 15 05:40:22 EDT 2009
Author: div0
Date: 2009-09-15 05:40:21 -0400 (Tue, 15 Sep 2009)
New Revision: 7803
Modified:
branches/nexuiz-2.0/.patchsets
branches/nexuiz-2.0/data/defaultNexuiz.cfg
branches/nexuiz-2.0/data/qcsrc/server/g_world.qc
Log:
r7778 | div0 | 2009-09-14 01:45:17 -0400 (Mon, 14 Sep 2009) | 2 lines
antilag fix, possibly
Modified: branches/nexuiz-2.0/.patchsets
===================================================================
--- branches/nexuiz-2.0/.patchsets 2009-09-15 09:39:12 UTC (rev 7802)
+++ branches/nexuiz-2.0/.patchsets 2009-09-15 09:40:21 UTC (rev 7803)
@@ -1,2 +1,2 @@
master = svn://svn.icculus.org/nexuiz/trunk
-revisions_applied = 1-7563,7565-7586,7589-7589,7592-7592,7595-7595,7597-7597,7599-7602,7605-7610,7612-7615,7619-7620,7623-7623,7626-7628,7630-7630,7644-7651,7656-7656,7658-7660,7663-7665,7670-7670,7672-7676,7678-7680,7686-7687,7689-7698,7701-7701,7703-7714,7717-7723,7731-7731,7735-7741,7744-7745,7752-7754,7756-7758,7761-7764,7771-7773,7775-7775
+revisions_applied = 1-7563,7565-7586,7589-7589,7592-7592,7595-7595,7597-7597,7599-7602,7605-7610,7612-7615,7619-7620,7623-7623,7626-7628,7630-7630,7644-7651,7656-7656,7658-7660,7663-7665,7670-7670,7672-7676,7678-7680,7686-7687,7689-7698,7701-7701,7703-7714,7717-7723,7731-7731,7735-7741,7744-7745,7752-7754,7756-7758,7761-7764,7771-7773,7775-7775,7778-7778
Modified: branches/nexuiz-2.0/data/defaultNexuiz.cfg
===================================================================
--- branches/nexuiz-2.0/data/defaultNexuiz.cfg 2009-09-15 09:39:12 UTC (rev 7802)
+++ branches/nexuiz-2.0/data/defaultNexuiz.cfg 2009-09-15 09:40:21 UTC (rev 7803)
@@ -427,6 +427,7 @@
pausable 0
seta g_spawnshieldtime 0 "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: branches/nexuiz-2.0/data/qcsrc/server/g_world.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/g_world.qc 2009-09-15 09:39:12 UTC (rev 7802)
+++ branches/nexuiz-2.0/data/qcsrc/server/g_world.qc 2009-09-15 09:40:21 UTC (rev 7803)
@@ -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