Merge pull request #3294 from Mailaender/single-player-orderlag
Set the OrderLatency to 1 in single player games
This commit is contained in:
@@ -325,10 +325,22 @@ namespace OpenRA.Server
|
|||||||
if (mods.Any(m => m.Contains("{DEV_VERSION}")))
|
if (mods.Any(m => m.Contains("{DEV_VERSION}")))
|
||||||
SendMessage("{0} is running an unversioned development build, ".F(client.Name) +
|
SendMessage("{0} is running an unversioned development build, ".F(client.Name) +
|
||||||
"and may desynchronize the game state if they have incompatible rules.");
|
"and may desynchronize the game state if they have incompatible rules.");
|
||||||
|
|
||||||
|
SetOrderLag();
|
||||||
}
|
}
|
||||||
catch (Exception) { DropClient(newConn); }
|
catch (Exception) { DropClient(newConn); }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void SetOrderLag()
|
||||||
|
{
|
||||||
|
if (lobbyInfo.IsSinglePlayer)
|
||||||
|
lobbyInfo.GlobalSettings.OrderLatency = 1;
|
||||||
|
else
|
||||||
|
lobbyInfo.GlobalSettings.OrderLatency = 3;
|
||||||
|
|
||||||
|
SyncLobbyInfo();
|
||||||
|
}
|
||||||
|
|
||||||
public static void SyncClientToPlayerReference(Session.Client c, PlayerReference pr)
|
public static void SyncClientToPlayerReference(Session.Client c, PlayerReference pr)
|
||||||
{
|
{
|
||||||
if (pr == null)
|
if (pr == null)
|
||||||
@@ -523,6 +535,8 @@ namespace OpenRA.Server
|
|||||||
toDrop.socket.Disconnect(false);
|
toDrop.socket.Disconnect(false);
|
||||||
}
|
}
|
||||||
catch { }
|
catch { }
|
||||||
|
|
||||||
|
SetOrderLag();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SyncLobbyInfo()
|
public void SyncLobbyInfo()
|
||||||
|
|||||||
Reference in New Issue
Block a user