Don't SUPERCEDE jointeam for bots - #460
Open
lucianene wants to merge 1 commit into
Open
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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