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:
@@ -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;
|
||||
|
@@ -353,6 +353,7 @@ struct NetworkSettings {
|
||||
uint16 sync_freq; ///< how often do we check whether we are still in-sync
|
||||
uint8 frame_freq; ///< how often do we send commands to the clients
|
||||
uint16 commands_per_frame; ///< how many commands may be sent each frame_freq frames?
|
||||
uint16 commands_per_frame_server; ///< how many commands may be sent each frame_freq frames? (server-originating commands)
|
||||
uint16 max_commands_in_queue; ///< how many commands may there be in the incoming queue before dropping the connection?
|
||||
uint16 bytes_per_frame; ///< how many bytes may, over a long period, be received per frame?
|
||||
uint16 bytes_per_frame_burst; ///< how many bytes may, over a short period, be received?
|
||||
|
@@ -69,6 +69,15 @@ min = 1
|
||||
max = 65535
|
||||
cat = SC_EXPERT
|
||||
|
||||
[SDTC_VAR]
|
||||
var = network.commands_per_frame_server
|
||||
type = SLE_UINT16
|
||||
flags = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC | SF_NETWORK_ONLY
|
||||
def = 16
|
||||
min = 1
|
||||
max = 65535
|
||||
cat = SC_EXPERT
|
||||
|
||||
[SDTC_VAR]
|
||||
var = network.max_commands_in_queue
|
||||
type = SLE_UINT16
|
||||
|
Reference in New Issue
Block a user