Merge pull request #3000 from Mailaender/dynamic-orderlag

Display Ping of joining Clients in Lobby and use it to calculate OrderLatency
This commit is contained in:
Chris Forbes
2013-04-20 16:57:00 -07:00
6 changed files with 88 additions and 14 deletions

View File

@@ -61,6 +61,7 @@ namespace OpenRA.Network
public bool IsAdmin;
public bool IsReady { get { return State == ClientState.Ready; } }
public bool IsObserver { get { return Slot == null; } }
public int Ping = -1;
}
public class Slot
@@ -82,7 +83,7 @@ namespace OpenRA.Network
public string Map;
public string[] Ban;
public string[] Mods = { "ra" }; // mod names
public int OrderLatency = 3;
public int OrderLatency = 3; // net tick frames (x 120 = ms)
public int RandomSeed = 0;
public bool FragileAlliances = false; // Allow diplomatic stance changes after game start.
public bool AllowCheats = false;

View File

@@ -164,8 +164,7 @@ namespace OpenRA.Network
&& !orderManager.GameStarted)
{
orderManager.FramesAhead = orderManager.LobbyInfo.GlobalSettings.OrderLatency;
Game.Debug(
"Order lag is now {0} frames.".F(orderManager.LobbyInfo.GlobalSettings.OrderLatency));
Game.Debug("Order lag is now {0} frames.".F(orderManager.LobbyInfo.GlobalSettings.OrderLatency));
}
Game.SyncLobbyInfo();
break;