Skip to content
This repository has been archived by the owner on Oct 6, 2020. It is now read-only.

Commit

Permalink
HSW exploit fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Riccardo H committed Apr 23, 2019
1 parent 691d416 commit 6dd231f
Showing 1 changed file with 16 additions and 55 deletions.
71 changes: 16 additions & 55 deletions addons/sourcemod/scripting/surftimer/hooks.sp
Original file line number Diff line number Diff line change
Expand Up @@ -869,61 +869,22 @@ public Action OnPlayerRunCmd(int client, int &buttons, int &impulse, float vel[3
}
else if (g_iCurrentStyle[client] == 2) // Half-sideways
{
if (!g_bInStartZone[client] && !g_bInStageZone[client])
{
if (buttons & IN_BACK && !(buttons & IN_MOVELEFT || buttons & IN_MOVERIGHT))
{
g_KeyCount[client]++;
if (g_KeyCount[client] == 60)
{
g_iCurrentStyle[client] = 0;
g_KeyCount[client] = 0;
CPrintToChat(client, "%t", "Hooks14", g_szChatPrefix);
}
}
else if (buttons & IN_BACK && (buttons & IN_MOVELEFT || buttons & IN_MOVERIGHT))
g_KeyCount[client] = 0;

if (buttons & IN_FORWARD && !(buttons & IN_MOVELEFT || buttons & IN_MOVERIGHT))
{
g_KeyCount[client]++;
if (g_KeyCount[client] == 60)
{
g_iCurrentStyle[client] = 0;
g_KeyCount[client] = 0;
CPrintToChat(client, "%t", "Hooks14", g_szChatPrefix);
}
}
else if (buttons & IN_FORWARD && (buttons & IN_MOVELEFT || buttons & IN_MOVERIGHT))
g_KeyCount[client] = 0;

if (buttons & IN_MOVELEFT && !(buttons & IN_FORWARD || buttons & IN_BACK))
{
g_KeyCount[client]++;
if (g_KeyCount[client] == 60)
{
g_iCurrentStyle[client] = 0;
g_KeyCount[client] = 0;
CPrintToChat(client, "%t", "Hooks14", g_szChatPrefix);
}
}
else if (buttons & IN_MOVELEFT && (buttons & IN_FORWARD || buttons & IN_BACK))
g_KeyCount[client] = 0;

if (buttons & IN_MOVERIGHT && !(buttons & IN_FORWARD || buttons & IN_BACK))
{
g_KeyCount[client]++;
if (g_KeyCount[client] == 60)
{
g_iCurrentStyle[client] = 0;
g_KeyCount[client] = 0;
CPrintToChat(client, "%t", "Hooks14", g_szChatPrefix);
}
}
else if (buttons & IN_MOVELEFT && (buttons & IN_FORWARD || buttons & IN_BACK))
g_KeyCount[client] = 0;
}
}
if (!g_bInStartZone[client] && !g_bInStageZone[client])
{
//Influx HSW
if ( vel[0] < 0.0 )
{
vel[0] = 0.0;
}

if ((vel[1] != 0.0 && vel[0] <= 0.0)
|| (vel[1] == 0.0 && vel[0] != 0.0) )
{
vel[0] = 0.0;
vel[1] = 0.0;
}
}
}
else if (g_iCurrentStyle[client] == 3) // Backwards
{
float eye[3];
Expand Down

0 comments on commit 6dd231f

Please sign in to comment.