Skip to content

fix: stop forcing players to T on UI reset, which restarted the round (#10) - #40

Open
cmer81 wants to merge 1 commit into
masterfrom
fix/10-tp-round-restart
Open

cmer81 wants to merge 1 commit into
masterfrom
fix/10-tp-round-restart

Conversation

@cmer81

@cmer81 cmer81 commented Oct 5, 2026

Copy link
Copy Markdown
Member

Root cause

FixClientUI() (called on any non-infection death of a player in thirdperson/mirror, e.g. sm_spec with forced suicide, kill, fall damage) moved the player to spectator and then always to T when ZombieReloaded is loaded.
Before the mother zombie spawns every player is CT, so this created the first spawnable T. CS:S CCSGameRules::NeededPlayersCheck then sees both teams populated after one was empty and calls TerminateRound(3.0, Game_Commencing), restarting the round. Neither ZR nor TeamManager (outside warmup) block that reason.

Fix

  • FixClientUI() puts the player back in their original team instead of forcing T (ZR already moves T spawns to CT and its respawn timer accepts both teams). No-op if the player is not on T/CT.
  • The delayed respawn now uses the userid and skips players that are alive or were moved to spectator meanwhile.
  • Remove the "no zombie spawned" restriction on sm_tp/sm_mirror added in feat: bump to 1.3.1 #9 as a workaround, and its now-unused state (g_bZombieSpawned, g_bTeamManager, round_start hook, ZR_OnClientInfected).
  • Bump version to 1.3.7.

Verification

Compiled with spcomp 1.13.0.7427, no errors/warnings.

Closes #10

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.

bug: restart round exploit

1 participant