fix aa issue

This commit is contained in:
BenCat07 2018-04-02 11:48:40 +02:00
parent 6f81c68ce9
commit 104b779f14
2 changed files with 6 additions and 2 deletions

View File

@ -463,7 +463,7 @@ void ProcessUserCmd(CUserCmd *cmd)
angstate = !angstate;
if (!LOCAL_E->m_bAlivePlayer)
angstate = true;
if (g_pUserCmd->buttons & IN_ATTACK || g_pUserCmd->buttons & IN_ATTACK2)
if (lagexploit::ExploitActive() || g_pUserCmd->buttons & IN_ATTACK || g_pUserCmd->buttons & IN_ATTACK2)
angstate = true;
*bSendPackets = angstate;
float &p = cmd->viewangles.x;

View File

@ -52,7 +52,7 @@ void AddExploitTicks(int ticks)
{
exticks = std::max(ticks, exticks);
}
bool active = false;
bool ExploitActive()
{
if (toggle)
@ -65,6 +65,8 @@ bool ExploitActive()
{
return true;
}
if (active)
return true;
return false;
}
@ -76,6 +78,7 @@ float servertime, nextattack;
static int lastwep = 0;
void CreateMove()
{
active = false;
if (CE_BAD(LOCAL_E))
return;
if (!LOCAL_E->m_bAlivePlayer)
@ -445,6 +448,7 @@ void CreateMove()
}
if (!amount)
return;
active = true;
/*g_pUserCmd->command_number += amount;
g_pUserCmd->hasbeenpredicted = true;
*(int *) ((unsigned) g_IBaseClientState + offsets::lastoutgoingcommand()) +=