Updated votelogger and Autojoin

made votelogger delay 0

AutoJoin is now faster than 5 seconds
This commit is contained in:
MasterCatPL 2024-04-14 00:19:31 +02:00
parent 59ea88464a
commit 3000056318
2 changed files with 5 additions and 4 deletions

View File

@ -37,7 +37,6 @@ bool UnassignedClass()
return g_pLocalPlayer->clazz != *autojoin_class;
}
static Timer autoteam_timer{};
static Timer startqueue_timer{};
#if not ENABLE_VISUALS
Timer queue_time{};
@ -101,6 +100,7 @@ void updateSearch()
tfmm::startQueue();
}
}
startqueue_timer.test_and_set(5000);
#if not ENABLE_VISUALS
if (queue_time.test_and_set(1200000))
@ -111,7 +111,8 @@ void updateSearch()
}
static void update()
{
if (autoteam_timer.test_and_set(5000))
static Timer autoteam_timer{};
if (autoteam_timer.test_and_set(750))
{
if (autojoin_team and UnassignedTeam())
{

View File

@ -122,14 +122,14 @@ void dispatchUserMessage(bf_read &buffer, int type)
if (*vote_kickn && friendly_kicked)
{
vote_command = { strfmt("vote %d option2", vote_id).get(), 1000u + (rand() % 5000) };
vote_command = { strfmt("vote %d option2", vote_id).get(), 0 };
vote_command.timer.update();
if (*vote_rage_vote && !friendly_caller)
pl_caller.state = k_EState::RAGE;
}
else if (*vote_kicky && !friendly_kicked)
{
vote_command = { strfmt("vote %d option1", vote_id).get(), 1000u + (rand() % 5000) };
vote_command = { strfmt("vote %d option1", vote_id).get(), 0 };
vote_command.timer.update();
}
}