Skip to content

Fix competitive idle map rotation#1684

Merged
Rainyan merged 1 commit intoNeotokyoRebuild:masterfrom
Rainyan:bug/comp-mapcycle
Feb 14, 2026
Merged

Fix competitive idle map rotation#1684
Rainyan merged 1 commit intoNeotokyoRebuild:masterfrom
Rainyan:bug/comp-mapcycle

Conversation

@Rainyan
Copy link
Collaborator

@Rainyan Rainyan commented Feb 14, 2026

Description

Fix a bug with the idle map cycle cvar mp_mapcycle_empty_timeout_seconds combined with cvar value sv_neo_comp 1 causing an infinitely failing map change loop, where the idle mapchange logic and the sv_neo_readyup_... logic are fighting each other, and endlessly flipping the m_bChangelevelDone gamerules value back and forth.

This commit simply introduces a new m_bRotatingMapRightNow gamerules state flag for the idle rotation special case to sidestep the problem, instead of refactoring the logic. But it should be good enough to get this problem fixed for now. Could be cleaned up in some future refactor...

Steps to reproduce the bug:

  • Start a SRCDS server
  • Use commands:
sv_neo_comp 1; // Necessary to trigger the bug!

// How many seconds must the server be empty until attempting to change maps,
// set to a low value to trigger the bug fast.
mp_mapcycle_empty_timeout_seconds 10;

Toolchain

  • Windows MSVC VS2022
  • Linux GCC 10 Sniper 3.0

Linked Issues

Fix a bug with the idle map cycle cvar
"mp_mapcycle_empty_timeout_seconds" combined with "sv_neo_comp 1"
causing an infinitely failing map change loop, where the idle mapchange
logic and the sv_neo_readyup logic are fighting each other and flipping
the m_bChangelevelDone value back and forth.

This commit simply introduces a new "m_bRotatingMapRightNow" state flag
for the idle rotation special case to sidestep the problem instead of
refactoring the logic. Could be cleaned up in some future refactor...
@Rainyan Rainyan requested a review from a team February 14, 2026 16:52
@DESTROYGIRL DESTROYGIRL requested a review from a team February 14, 2026 17:46
@Rainyan Rainyan merged commit 95fc091 into NeotokyoRebuild:master Feb 14, 2026
7 checks passed
@Rainyan Rainyan deleted the bug/comp-mapcycle branch February 14, 2026 19:23
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.

Dedicated servers running sv_neo_comp 1 will flood console after some time

3 participants