Update LagCompensation with CS:GO Windows release

This commit is contained in:
xen
2020-02-26 12:14:26 +02:00
parent 18779939f4
commit 8afa26a20d
2 changed files with 26 additions and 12 deletions
+12 -8
View File
@@ -5,7 +5,7 @@
#include <dhooks>
#include <clientprefs>
#define PLUGIN_VERSION "1.0"
#define PLUGIN_VERSION "1.0.1"
#define SetBit(%1,%2) ((%1)[(%2) >> 5] |= (1 << ((%2) & 31)))
#define ClearBit(%1,%2) ((%1)[(%2) >> 5] &= ~(1 << ((%2) & 31)))
@@ -366,9 +366,10 @@ public void OnMapStart()
{
if(IsClientInGame(client))
{
OnClientPutInServer(client);
OnClientConnected(client);
if(AreClientCookiesCached(client))
OnClientCookiesCached(client);
OnClientPutInServer(client);
}
}
@@ -398,13 +399,8 @@ public void OnMapEnd()
g_bCleaningUp = true;
}
public void OnClientPutInServer(int client)
public void OnClientConnected(int client)
{
if(g_iLerpTime == -1)
{
g_iLerpTime = FindDataMapInfo(client, "m_fLerpTime");
}
g_bDisableLagComp[client] = false;
g_iDisableLagComp[client] = 0;
}
@@ -419,6 +415,14 @@ public void OnClientCookiesCached(int client)
g_bDisableLagComp[client] = false;
}
public void OnClientPutInServer(int client)
{
if(g_iLerpTime == -1)
{
g_iLerpTime = FindDataMapInfo(client, "m_fLerpTime");
}
}
public void OnClientDisconnect(int client)
{
g_bDisableLagComp[client] = false;