commit
7fbbfc252b
@ -15,12 +15,10 @@
|
|||||||
|
|
||||||
namespace hacks::shared::anticheat
|
namespace hacks::shared::anticheat
|
||||||
{
|
{
|
||||||
|
|
||||||
void Accuse(int eid, const std::string &hack, const std::string &details);
|
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 Init();
|
||||||
void CreateMove();
|
void CreateMove();
|
||||||
|
void SetRage(player_info_t info);
|
||||||
void ResetPlayer(int index);
|
void ResetPlayer(int index);
|
||||||
void ResetEverything();
|
void ResetEverything();
|
||||||
}
|
}
|
||||||
|
@ -17,7 +17,6 @@ namespace shared
|
|||||||
{
|
{
|
||||||
namespace anticheat
|
namespace anticheat
|
||||||
{
|
{
|
||||||
|
|
||||||
static CatVar enabled(CV_SWITCH, "ac_enabled", "0", "Enable AC");
|
static CatVar enabled(CV_SWITCH, "ac_enabled", "0", "Enable AC");
|
||||||
static CatVar accuse_chat(CV_SWITCH, "ac_chat", "0", "Accuse in chat");
|
static CatVar accuse_chat(CV_SWITCH, "ac_chat", "0", "Accuse in chat");
|
||||||
static CatVar autorage(CV_SWITCH, "ac_autorage", "0", "Auto Rage");
|
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");
|
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()
|
void CreateMove()
|
||||||
{
|
{
|
||||||
if (!enabled)
|
if (!enabled)
|
||||||
|
@ -63,10 +63,9 @@ void Update(CachedEntity *player)
|
|||||||
// deviation, data.detections);
|
// deviation, data.detections);
|
||||||
player_info_t info;
|
player_info_t info;
|
||||||
g_IEngine->GetPlayerInfo(player->m_IDX, &info);
|
g_IEngine->GetPlayerInfo(player->m_IDX, &info);
|
||||||
if (am > 5 && hacks::shared::anticheat::autorage)
|
if (am > 5)
|
||||||
{
|
{
|
||||||
playerlist::AccessData(info.friendsID).state =
|
hacks::shared::anticheat::SetRage(info);
|
||||||
playerlist::k_EState::RAGE;
|
|
||||||
am = 0;
|
am = 0;
|
||||||
}
|
}
|
||||||
if (++data.detections > int(detections_warning))
|
if (++data.detections > int(detections_warning))
|
||||||
|
@ -50,10 +50,9 @@ void Update(CachedEntity *player)
|
|||||||
am++;
|
am++;
|
||||||
player_info_t info;
|
player_info_t info;
|
||||||
g_IEngine->GetPlayerInfo(player->m_IDX, &info);
|
g_IEngine->GetPlayerInfo(player->m_IDX, &info);
|
||||||
if (am > 5 && hacks::shared::anticheat::autorage)
|
if (am > 5)
|
||||||
{
|
{
|
||||||
playerlist::AccessData(info.friendsID).state =
|
hacks::shared::anticheat::SetRage(info);
|
||||||
playerlist::k_EState::RAGE;
|
|
||||||
am = 0;
|
am = 0;
|
||||||
}
|
}
|
||||||
std::string reason =
|
std::string reason =
|
||||||
|
@ -1021,13 +1021,13 @@ void PrintChat(const char *fmt, ...)
|
|||||||
CHudBaseChat *chat = (CHudBaseChat *) g_CHUD->FindElement("CHudChat");
|
CHudBaseChat *chat = (CHudBaseChat *) g_CHUD->FindElement("CHudChat");
|
||||||
if (chat)
|
if (chat)
|
||||||
{
|
{
|
||||||
char *buf = new char[1024];
|
std::unique_ptr<char> buf (new char[1024]);
|
||||||
va_list list;
|
va_list list;
|
||||||
va_start(list, fmt);
|
va_start(list, fmt);
|
||||||
vsprintf(buf, fmt, list);
|
vsprintf(buf.get(), fmt, list);
|
||||||
va_end(list);
|
va_end(list);
|
||||||
std::unique_ptr<char> str(strfmt("\x07%06X[\x07%06XCAT\x07%06X]\x01 %s",
|
std::unique_ptr<char> str(strfmt("\x07%06X[\x07%06XCAT\x07%06X]\x01 %s",
|
||||||
0x5e3252, 0xba3d9a, 0x5e3252, buf));
|
0x5e3252, 0xba3d9a, 0x5e3252, buf.get()));
|
||||||
// FIXME DEBUG LOG
|
// FIXME DEBUG LOG
|
||||||
logging::Info("%s", str.get());
|
logging::Info("%s", str.get());
|
||||||
chat->Printf(str.get());
|
chat->Printf(str.get());
|
||||||
|
@ -140,7 +140,7 @@ ITexture *GetBuffer(int i)
|
|||||||
IMAGE_FORMAT_RGBA8888, MATERIAL_RT_DEPTH_SEPARATE, textureFlags,
|
IMAGE_FORMAT_RGBA8888, MATERIAL_RT_DEPTH_SEPARATE, textureFlags,
|
||||||
renderTargetFlags);
|
renderTargetFlags);
|
||||||
}
|
}
|
||||||
|
delete newname;
|
||||||
buffers[i].Init(texture);
|
buffers[i].Init(texture);
|
||||||
}
|
}
|
||||||
return buffers[i];
|
return buffers[i];
|
||||||
|
Reference in New Issue
Block a user