1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-24 12:44:10 +01:00

Codechange: Use EnumBitSet for PauseMode. (#13553)

This commit is contained in:
Peter Nelson
2025-02-14 08:30:04 +00:00
committed by GitHub
parent 3518d7e0f1
commit 6cf7a899e9
27 changed files with 113 additions and 118 deletions

View File

@@ -328,7 +328,7 @@ static void DistributeQueue(CommandQueue &queue, const NetworkClientSocket *owne
/* Not technically the most performant way, but consider clients rarely click more than once per tick. */
for (auto cp = queue.begin(); cp != queue.end(); /* removing some items */) {
/* Do not distribute commands when paused and the command is not allowed while paused. */
if (_pause_mode != PM_UNPAUSED && !IsCommandAllowedWhilePaused(cp->cmd)) {
if (_pause_mode.Any() && !IsCommandAllowedWhilePaused(cp->cmd)) {
++cp;
continue;
}