try shizo thing to reduce netlag
This commit is contained in:
1 parent
4d6b5437c8
commit
bccad86f50
2 files changed
+9
-2
No files matched your search
+7
-2
@@ -110,9 +110,11 @@ UINT32 playerpingtable[MAXPLAYERS]; //table of player latency values.
|
||||
static tic_t reference_lag;
|
||||
static UINT8 spike_time;
|
||||
tic_t lowest_lag;
|
||||
tic_t simulated_lag; // just for ping readout without netticbuffer added
|
||||
tic_t simulated_lag;
|
||||
boolean server_lagless;
|
||||
|
||||
tic_t netticbuffer = 0;
|
||||
|
||||
static void Lagless_OnChange(void)
|
||||
{
|
||||
/* don't back out of dishonesty, or go lagless after playing honestly */
|
||||
@@ -6535,7 +6537,7 @@ boolean TryRunTics(tic_t realtics)
|
||||
}
|
||||
|
||||
// Leave a certain amount of tics present in the net buffer as long as we've ran at least one tic this frame.
|
||||
if (client && gamestate == GS_LEVEL && leveltime > 3 && neededtic <= gametic + cv_netticbuffer.value)
|
||||
if (client && gamestate == GS_LEVEL && leveltime > 3 && neededtic <= gametic + netticbuffer)
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -6814,6 +6816,9 @@ void NetUpdate(void)
|
||||
nowtime = I_GetTime();
|
||||
realtics = nowtime - gametime;
|
||||
|
||||
Net_GetNetStat();
|
||||
netticbuffer = (((gamelostpercent > 1.f) || (playerpingtable[consoleplayer] == 1)) ? CLAMP(cv_netticbuffer.value, 1, 3) : cv_netticbuffer.value);
|
||||
|
||||
if (realtics <= 0) // nothing new to update
|
||||
return;
|
||||
|
||||
|
||||
@@ -865,6 +865,8 @@ void D_SRB2Loop(void)
|
||||
if (takescreenshot)
|
||||
M_DoScreenShot();
|
||||
|
||||
NetUpdate();
|
||||
|
||||
// consoleplayer -> displayplayers (hear sounds from viewpoint)
|
||||
S_UpdateSounds(); // move positional sounds
|
||||
|
||||
|
||||
Reference in new issue
Block a user