1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-25 15:39:09 +00:00

Change: Add separate setting for server sent commands per frame limit (#11023)

Set a higher default value for this setting.
Use the higher of this and existing commands per frame limit
setting for server-originating commands, e.g. GS.

This is to support the GSAsyncMode class.
This also avoids undue throttling when more than one
script is in operation (e.g. AIs).
This commit is contained in:
Jonathan G Rennison
2023-06-27 12:32:45 +01:00
committed by GitHub
parent 8465559488
commit 55c07eed59
3 changed files with 14 additions and 0 deletions

View File

@@ -392,6 +392,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
CommandPacket *cp;