Skip to content

Don't SUPERCEDE jointeam for bots - #460

Open
lucianene wants to merge 1 commit into
Source2ZE:mainfrom
lucianene:fix/bot-jointeam
Open

Don't SUPERCEDE jointeam for bots#460
lucianene wants to merge 1 commit into
Source2ZE:mainfrom
lucianene:fix/bot-jointeam

Conversation

@lucianene

@lucianene lucianene commented Aug 17, 2026

Copy link
Copy Markdown

When zr_enable is on, Hook_ClientCommand SUPERCEDEs every jointeam. That is correct for humans (ZR assigns teams), but bots use jointeam to finish connecting. After bot_kick / a bot_quota refill they then sit in status as 65535 [NoChan] challenging and never spawn.

The ignore has to happen at the hook site. An early return inside ZR_Hook_ClientCommand_JoinTeam still falls through to MRES_SUPERCEDE.

Human jointeam is unchanged. Boot-time fill already works via PutInServerSpawnPlayer; this only unblocks later quota refills.

If you run bots on ZR, set bot_join_team ct (or t). Default any can reopen the CT-force kick/re-add loop from #185 / Source2ZE/ZombieReborn#64.

bot_quota 0 then bot_quota 10 in the same map can still latch in the base game (#169). bot_kick then setting quota again is the path this fixes.

Test

  • zr_enable 1, bot_join_team ct, bot_quota 10, bot_quota_mode fill
  • bot_kick, wait for refill
  • status shows 10 real bots, not 65535 challenging ghosts

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant