Fix console error message on inject
This commit is contained in:
parent
a02683ee72
commit
47694e3242
@ -15,12 +15,10 @@
|
||||
|
||||
namespace hacks::shared::anticheat
|
||||
{
|
||||
|
||||
void Accuse(int eid, const std::string &hack, const std::string &details);
|
||||
static CatVar autorage(CV_SWITCH, "ac_autorage", "0", "Auto Rage");
|
||||
void Init();
|
||||
void CreateMove();
|
||||
|
||||
void SetRage(player_info_t info);
|
||||
void ResetPlayer(int index);
|
||||
void ResetEverything();
|
||||
}
|
||||
|
@ -17,7 +17,6 @@ namespace shared
|
||||
{
|
||||
namespace anticheat
|
||||
{
|
||||
|
||||
static CatVar enabled(CV_SWITCH, "ac_enabled", "0", "Enable AC");
|
||||
static CatVar accuse_chat(CV_SWITCH, "ac_chat", "0", "Accuse in chat");
|
||||
static CatVar autorage(CV_SWITCH, "ac_autorage", "0", "Auto Rage");
|
||||
@ -47,6 +46,12 @@ void Accuse(int eid, const std::string &hack, const std::string &details)
|
||||
|
||||
static CatVar skip_local(CV_SWITCH, "ac_ignore_local", "1", "Ignore Local");
|
||||
|
||||
void SetRage(player_info_t info)
|
||||
{
|
||||
if (autorage)
|
||||
playerlist::AccessData(info.friendsID).state = playerlist::k_EState::RAGE;
|
||||
}
|
||||
|
||||
void CreateMove()
|
||||
{
|
||||
if (!enabled)
|
||||
|
@ -63,10 +63,9 @@ void Update(CachedEntity *player)
|
||||
// deviation, data.detections);
|
||||
player_info_t info;
|
||||
g_IEngine->GetPlayerInfo(player->m_IDX, &info);
|
||||
if (am > 5 && hacks::shared::anticheat::autorage)
|
||||
if (am > 5)
|
||||
{
|
||||
playerlist::AccessData(info.friendsID).state =
|
||||
playerlist::k_EState::RAGE;
|
||||
hacks::shared::anticheat::SetRage(info);
|
||||
am = 0;
|
||||
}
|
||||
if (++data.detections > int(detections_warning))
|
||||
|
@ -50,10 +50,9 @@ void Update(CachedEntity *player)
|
||||
am++;
|
||||
player_info_t info;
|
||||
g_IEngine->GetPlayerInfo(player->m_IDX, &info);
|
||||
if (am > 5 && hacks::shared::anticheat::autorage)
|
||||
if (am > 5)
|
||||
{
|
||||
playerlist::AccessData(info.friendsID).state =
|
||||
playerlist::k_EState::RAGE;
|
||||
hacks::shared::anticheat::SetRage(info);
|
||||
am = 0;
|
||||
}
|
||||
std::string reason =
|
||||
|
Reference in New Issue
Block a user