AntiBhopCheat: remove useless stats and add autism
This commit is contained in:
		
							parent
							
								
									08f33f2428
								
							
						
					
					
						commit
						99c9688908
					
				@ -45,8 +45,8 @@ public void OnPluginStart()
 | 
			
		||||
	{
 | 
			
		||||
		if(IsClientConnected(client))
 | 
			
		||||
		{
 | 
			
		||||
			if(IsClientInGame(client))
 | 
			
		||||
				OnClientPutInServer(client);
 | 
			
		||||
			if(IsClientConnected(client))
 | 
			
		||||
				OnClientConnected(client);
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
@ -54,8 +54,14 @@ public void OnPluginStart()
 | 
			
		||||
	g_hOnClientDetected = CreateGlobalForward("AntiBhopCheat_OnClientDetected", ET_Ignore, Param_Cell, Param_String, Param_String);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
public void OnClientPutInServer(int client)
 | 
			
		||||
public void OnClientConnected(int client)
 | 
			
		||||
{
 | 
			
		||||
	if(g_aPlayers[client])
 | 
			
		||||
	{
 | 
			
		||||
		g_aPlayers[client].Dispose();
 | 
			
		||||
		g_aPlayers[client] = null;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	g_aPlayers[client] = new CPlayer(client);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -533,8 +539,8 @@ int FormatStreak(int client, int iTarget, int iStreak, char[] sBuf=0, int len=0)
 | 
			
		||||
		(aStreakJumps[1] / float(iStreakJumps)) * 100.0,
 | 
			
		||||
		(aStreakJumps[2] / float(iStreakJumps)) * 100.0);
 | 
			
		||||
 | 
			
		||||
	iBuf += ConsoleFormat(client, sBuf[iBuf], len-iBuf, "#%2s %5s %7s %7s %5s %5s %8s %4s %6s   %s\n",
 | 
			
		||||
		"id", " diff", "  invel", " outvel", " gain", " comb", " avgdist", " num", " avg+-", "pattern");
 | 
			
		||||
	iBuf += ConsoleFormat(client, sBuf[iBuf], len-iBuf, "#%2s %7s %5s %8s %4s %6s   %s\n",
 | 
			
		||||
		"id", " outvel", " gain", " avgdist", " num", " avg+-", "pattern");
 | 
			
		||||
 | 
			
		||||
	ArrayList hJumps = hStreak.hJumps;
 | 
			
		||||
	float fPrevVel = 0.0;
 | 
			
		||||
@ -549,7 +555,7 @@ int FormatStreak(int client, int iTarget, int iStreak, char[] sBuf=0, int len=0)
 | 
			
		||||
		float fOutVel = hJump.fEndVel;
 | 
			
		||||
		int iEndTick = hJump.iEndTick;
 | 
			
		||||
 | 
			
		||||
		static char sPattern[256];
 | 
			
		||||
		static char sPattern[512];
 | 
			
		||||
		int iPatternLen = 0;
 | 
			
		||||
		int iPrevTick = -1;
 | 
			
		||||
		int iTicks;
 | 
			
		||||
@ -605,12 +611,9 @@ int FormatStreak(int client, int iTarget, int iStreak, char[] sBuf=0, int len=0)
 | 
			
		||||
		if(fPrevVel == 0.0)
 | 
			
		||||
			fPrevVel = fInVel;
 | 
			
		||||
 | 
			
		||||
		iBuf += ConsoleFormat(client, sBuf[iBuf], len-iBuf, "#%2d %4d%% %7.1f %7.1f %4d%% %4d%% %8.2f %4d %6.2f   %s\n",
 | 
			
		||||
		iBuf += ConsoleFormat(client, sBuf[iBuf], len-iBuf, "#%2d %7.1f %4d%% %8.2f %4d %6.2f   %s\n",
 | 
			
		||||
			i,
 | 
			
		||||
			fPrevVel == 0.0 ? 100 : RoundFloat((fInVel / fPrevVel) * 100.0 - 100.0),
 | 
			
		||||
			fInVel,
 | 
			
		||||
			fOutVel,
 | 
			
		||||
			fInVel == 0.0 ? 100 : RoundFloat((fOutVel / fInVel) * 100.0 - 100.0),
 | 
			
		||||
			fPrevVel == 0.0 ? 100 : RoundFloat((fOutVel / fPrevVel) * 100.0 - 100.0),
 | 
			
		||||
			fAvgDist,
 | 
			
		||||
			iPresses,
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user