Don't SUPERCEDE jointeam for bots - #460
Conversation
ZR intercepts jointeam so humans cannot pick a team. Bots use the same command to finish connecting after a quota refill, and SUPERCEDE leaves them stuck in challenging. Co-authored-by: Cursor <cursoragent@cursor.com>
There was a problem hiding this comment.
Please disclose AI use if/when applicable.
After
bot_kick/ abot_quotarefill they then sit instatusas65535 [NoChan] challengingand never spawn.
That's not what's happening here, disconnected players will often have their controllers persist, appearing this way in status. Those are simply the bots you just kicked, the same behaviour can be seen when real players disconnect from the server.
That aside, I've found no observable bot behaviour changes when testing this PR. The behaviour you describe happens because bot_kick resets bot_quota to 0, regardless of if this PR is being used or not. It also doesn't fix the infinite bot team switch loop that happens in certain configurations.
| // Engine jointeam is how bots finish connecting after bot_kick / quota refill. | ||
| if (pController->IsBot()) | ||
| return; |
There was a problem hiding this comment.
This is redundant, because you're already checking IsBot in the only place this function is called.
When
zr_enableis on,Hook_ClientCommandSUPERCEDEs everyjointeam. That is correct for humans (ZR assigns teams), but bots usejointeamto finish connecting. Afterbot_kick/ abot_quotarefill they then sit instatusas65535 [NoChan] challengingand never spawn.The ignore has to happen at the hook site. An early return inside
ZR_Hook_ClientCommand_JoinTeamstill falls through toMRES_SUPERCEDE.Human
jointeamis unchanged. Boot-time fill already works viaPutInServer→SpawnPlayer; this only unblocks later quota refills.If you run bots on ZR, set
bot_join_team ct(ort). Defaultanycan reopen the CT-force kick/re-add loop from #185 / Source2ZE/ZombieReborn#64.bot_quota 0thenbot_quota 10in the same map can still latch in the base game (#169).bot_kickthen setting quota again is the path this fixes.Test
zr_enable 1,bot_join_team ct,bot_quota 10,bot_quota_mode fillbot_kick, wait for refillstatusshows 10 real bots, not65535challenging ghosts