Port game speed selection to new lobby backend.

This commit is contained in:
Paul Chote
2016-07-02 10:51:55 +01:00
parent e858e13da7
commit 7caf636222
10 changed files with 52 additions and 118 deletions

View File

@@ -44,13 +44,10 @@ namespace OpenRA.Mods.Common.Widgets
clocks = new Dictionary<string, Animation>();
icon = new Animation(world, "icon");
// Timers should be synced to the effective game time, not the playback time.
GameSpeed speed;
var gameSpeeds = Game.ModData.Manifest.Get<GameSpeeds>();
if (gameSpeeds.Speeds.TryGetValue(world.LobbyInfo.GlobalSettings.GameSpeedType, out speed))
timestep = speed.Timestep;
else
timestep = world.Timestep;
// Timers in replays should be synced to the effective game time, not the playback time.
timestep = world.Timestep;
if (world.IsReplay)
timestep = world.WorldActor.Trait<MapOptions>().GameSpeed.Timestep;
}
protected ObserverSupportPowerIconsWidget(ObserverSupportPowerIconsWidget other)