LagCompensation: fix turning off lagcomp
This commit is contained in:
parent
c84f602ee4
commit
f7fc48a874
@ -763,15 +763,18 @@ public Action OnPlayerRunCmd(int client, int &buttons, int &impulse, float vel[3
|
||||
if(!IsPlayerAlive(client))
|
||||
return Plugin_Continue;
|
||||
|
||||
if(g_bDisableLagComp[client])
|
||||
return Plugin_Continue;
|
||||
|
||||
// -1 because the newest record in the list is one tick old
|
||||
// this is because we simulate players first
|
||||
// hence no new entity record was inserted on the current tick
|
||||
int iGameTick = GetGameTickCount() - 1;
|
||||
|
||||
int iDelta = iGameTick - tickcount;
|
||||
|
||||
// The user is stupid and doesn't want lag compensation.
|
||||
// To get the original behavior back lets assume they actually have 0 latency.
|
||||
if(g_bDisableLagComp[client])
|
||||
iDelta = 0;
|
||||
|
||||
if(iDelta < 0)
|
||||
iDelta = 0;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user