# HG changeset patch # User Jonathan G Rennison # Date 2024-02-20 20:51:35 # Node ID d2835fac21090243671a2278242afdb225c79ae2 # Parent 13cc1ce7b773dd88fc4f9b059c6ca1236b1a1cfa Fix cb588d8d: Ordering of command per tick limit and pause mode filtering (#12126) The command per tick limit should be applied after the pause mode filter diff --git a/src/network/network_command.cpp b/src/network/network_command.cpp --- a/src/network/network_command.cpp +++ b/src/network/network_command.cpp @@ -327,15 +327,15 @@ static void DistributeQueue(CommandQueue /* 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 */) { - /* Limit the number of commands per client per tick. */ - if (--to_go < 0) break; - /* Do not distribute commands when paused and the command is not allowed while paused. */ if (_pause_mode != PM_UNPAUSED && !IsCommandAllowedWhilePaused(cp->cmd)) { ++cp; continue; } + /* Limit the number of commands per client per tick. */ + if (--to_go < 0) break; + DistributeCommandPacket(*cp, owner); NetworkAdminCmdLogging(owner, *cp); cp = queue.erase(cp);