Add anti auto balance for catbots and movement fixes
This commit is contained in:
parent
556713d6a4
commit
dc53e55156
@ -39,6 +39,7 @@
|
||||
<AutoVariable width="fill" target="cat-bot.votekicks" label="Random votekicks"/>
|
||||
<AutoVariable width="fill" target="cat-bot.always-crouch" label="Always Crouch"/>
|
||||
<AutoVariable width="fill" target="cat-bot.autoreport" label="Autoreport"/>
|
||||
<AutoVariable width="fill" target="cat-bot.anti-autobalance" label="Anti Auto balance"/>
|
||||
<AutoVariable width="fill" target="misc.autodisguise" label="Autodisguise"/>
|
||||
</List>
|
||||
</Box>
|
||||
|
@ -514,7 +514,13 @@ DEFINE_HOOKED_METHOD(CreateMove, bool, void *this_, float input_sample_time,
|
||||
cmd->viewangles.y);
|
||||
cmd->forwardmove = cos(yaw) * speed;
|
||||
cmd->sidemove = sin(yaw) * speed;
|
||||
if (cmd->viewangles.x >= 90 && cmd->viewangles.x <= 270)
|
||||
|
||||
float angles = fmod(cmd->viewangles.x + 180.0f, 360.0f);
|
||||
if (angles < 0)
|
||||
angles += 180.0f;
|
||||
angles -= 180.0f;
|
||||
angles *=-1;
|
||||
if (angles >= 90 && angles <= 270)
|
||||
cmd->forwardmove = -cmd->forwardmove;
|
||||
}
|
||||
|
||||
|
@ -16,6 +16,7 @@ static settings::Bool dispatch_log{ "debug.log-dispatch-user-msg", "false" };
|
||||
static settings::Bool chat_filter_enable{ "chat.censor.enable", "false" };
|
||||
static settings::Bool identify{ "chat.identify", "false" };
|
||||
static settings::Bool answerIdentify{ "chat.identify.answer", "false" };
|
||||
static settings::Bool anti_votekick{ "cat-bot.anti-autobalance", "false" };
|
||||
|
||||
static bool retrun = false;
|
||||
static Timer sendmsg{};
|
||||
@ -76,19 +77,15 @@ DEFINE_HOOKED_METHOD(DispatchUserMessage, bool, void *this_, int type,
|
||||
}
|
||||
int loop_index, s, i, j;
|
||||
char *data, c;
|
||||
if (type == 5)
|
||||
if (type == 5 && *anti_votekick)
|
||||
if (buf.GetNumBytesLeft() > 35)
|
||||
{
|
||||
std::string message_name;
|
||||
for (int i = 0; i < buf.GetNumBytesLeft(); i++)
|
||||
{
|
||||
int byte = buf.ReadByte();
|
||||
message_name.push_back(byte);
|
||||
}
|
||||
while (buf.GetNumBytesLeft())
|
||||
message_name.push_back(buf.ReadByte());
|
||||
logging::Info("%s", message_name.c_str());
|
||||
if (message_name.find("TeamChangePending") != message_name.npos)
|
||||
logging::Info("test, %d %d", int(message_name[0]),
|
||||
(CE_GOOD(LOCAL_E) ? LOCAL_E->m_IDX : -1));
|
||||
if (message_name.find("TeamChangeP") != message_name.npos && CE_GOOD(LOCAL_E))
|
||||
g_IEngine->ClientCmd_Unrestricted("cat_disconnect;wait 100;cat_mm_join");
|
||||
buf.Seek(0);
|
||||
}
|
||||
if (type == 4)
|
||||
|
@ -24,7 +24,11 @@ CatCommand join_spam("join_spam", "Spam joins server for X seconds",
|
||||
joinspam.update();
|
||||
spamdur = id;
|
||||
});
|
||||
|
||||
CatCommand join("mm_join", "Join mm Matcgh", [](){
|
||||
auto gc = re::CTFGCClientSystem::GTFGCClientSystem();
|
||||
if (gc)
|
||||
gc->JoinMMMatch();
|
||||
});
|
||||
void *pure_orig = nullptr;
|
||||
void **pure_addr = nullptr;
|
||||
|
||||
|
Reference in New Issue
Block a user