Skip to content
Browse files

Fix catbots getting stuck while respawning

Their respawn timer used to reset to 2 seconds all the time. This is fixed by telling the server that we closed the class selection menu using the command "menuclosed".
  • Loading branch information...
TotallyNotElite committed Oct 26, 2019
1 parent 0c55764 commit 7bc2bedf6df5d0e7ebf745dc52bf5e84065f5f83
Showing with 15 additions and 4 deletions.
  1. +15 −4 src/hacks/CatBot.cpp
@@ -741,7 +741,8 @@ static void cm()

static Timer autojointeam{};
static Timer unstuck{};
static int unstucks;
static Timer report_timer2{};
void update()
@@ -775,9 +776,19 @@ void update()

if (LOCAL_E->m_bAlivePlayer())
if (autojointeam.test_and_set(60000) && !LOCAL_E->m_bAlivePlayer())
hack::command_stack().push("autoteam; join_class sniper");
unstucks = 0;
if (unstuck.test_and_set(10000))
// Send menuclosed to tell the server that we want to respawn
// If that didnt work, force pick a team and class
if (unstucks > 3)
hack::command_stack().push("autoteam; join_class sniper");

if (micspam)

0 comments on commit 7bc2bed

Please sign in to comment.
You can’t perform that action at this time.