Fix singleplayer game latency.

This commit is contained in:
Paul Chote
2015-10-31 11:22:52 +00:00
parent 168dab9707
commit 64498b1ea7
2 changed files with 15 additions and 2 deletions

View File

@@ -408,7 +408,19 @@ namespace OpenRA.Server
void SetOrderLag()
{
LobbyInfo.GlobalSettings.OrderLatency = LobbyInfo.IsSinglePlayer ? 1 : 3;
int latency = 1;
if (!LobbyInfo.IsSinglePlayer)
{
var gameSpeeds = Game.ModData.Manifest.Get<GameSpeeds>();
GameSpeed speed;
if (gameSpeeds.Speeds.TryGetValue(LobbyInfo.GlobalSettings.GameSpeedType, out speed))
latency = speed.OrderLatency;
else
latency = 3;
}
LobbyInfo.GlobalSettings.OrderLatency = latency;
SyncLobbyGlobalSettings();
}