Add setting for server sent commands per frame limit

Use higher of this and existing commands per frame limit setting
for server-originating commands, e.g. GS
This commit is contained in:
Jonathan G Rennison
2023-05-23 21:55:10 +01:00
parent a25e674f06
commit 72dcdfafbd
3 changed files with 14 additions and 0 deletions

View File

@@ -286,6 +286,10 @@ static void DistributeQueue(CommandQueue *queue, const NetworkClientSocket *owne
int to_go = UINT16_MAX;
#else
int to_go = _settings_client.network.commands_per_frame;
if (owner == nullptr) {
/* This is the server, use the commands_per_frame_server setting if higher */
to_go = std::max<int>(to_go, _settings_client.network.commands_per_frame_server);
}
#endif
std::unique_ptr<CommandPacket> cp;