From 3724f46a3ea7b376d28faec796e63e083abfafe7 Mon Sep 17 00:00:00 2001 From: Bob Date: Sun, 10 Oct 2010 21:43:45 +1300 Subject: [PATCH] remove world arg to SyncLobbyInfo and HandleInput --- OpenRA.Game/Game.cs | 12 ++++++------ OpenRA.Game/Network/UnitOrders.cs | 2 +- OpenRA.Game/Widgets/Widget.cs | 2 +- OpenRA.Mods.RA/Widgets/RadarBinWidget.cs | 4 ++-- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/OpenRA.Game/Game.cs b/OpenRA.Game/Game.cs index f8a71a38a2..851919c65d 100644 --- a/OpenRA.Game/Game.cs +++ b/OpenRA.Game/Game.cs @@ -163,15 +163,15 @@ namespace OpenRA internal static event Action LobbyInfoChanged = () => { }; - internal static void SyncLobbyInfo( World world, string data) + internal static void SyncLobbyInfo( string data) { LobbyInfo = Session.Deserialize(data); - if( !world.GameHasStarted ) - world.SharedRandom = new XRandom( LobbyInfo.GlobalSettings.RandomSeed ); + //if( !world.GameHasStarted ) + // world.SharedRandom = new XRandom( LobbyInfo.GlobalSettings.RandomSeed ); - if (orderManager.Connection.ConnectionState == ConnectionState.Connected) - world.SetLocalPlayer(orderManager.Connection.LocalClientId); + //if (orderManager.Connection.ConnectionState == ConnectionState.Connected) + // world.SetLocalPlayer(orderManager.Connection.LocalClientId); if (orderManager.FramesAhead != LobbyInfo.GlobalSettings.OrderLatency && !orderManager.GameStarted) @@ -217,7 +217,7 @@ namespace OpenRA Location = new int2( e.Location ), Modifiers = modifierKeys, }; - Widget.HandleInput( world, mi ); + Widget.HandleInput( mi ); } ); } diff --git a/OpenRA.Game/Network/UnitOrders.cs b/OpenRA.Game/Network/UnitOrders.cs index 57787e25fc..d504bf70ef 100755 --- a/OpenRA.Game/Network/UnitOrders.cs +++ b/OpenRA.Game/Network/UnitOrders.cs @@ -78,7 +78,7 @@ namespace OpenRA.Network } case "SyncInfo": { - Game.SyncLobbyInfo( world, order.TargetString); + Game.SyncLobbyInfo( order.TargetString); break; } case "SetStance": diff --git a/OpenRA.Game/Widgets/Widget.cs b/OpenRA.Game/Widgets/Widget.cs index 803544867b..d5344f9e43 100644 --- a/OpenRA.Game/Widgets/Widget.cs +++ b/OpenRA.Game/Widgets/Widget.cs @@ -196,7 +196,7 @@ namespace OpenRA.Widgets public virtual bool HandleInputInner(MouseInput mi) { return !ClickThrough; } - public static bool HandleInput(World world, MouseInput mi) + public static bool HandleInput(MouseInput mi) { bool handled = false; if (SelectedWidget != null && SelectedWidget.HandleMouseInputOuter(mi)) diff --git a/OpenRA.Mods.RA/Widgets/RadarBinWidget.cs b/OpenRA.Mods.RA/Widgets/RadarBinWidget.cs index a30e541f7f..117fce0df6 100755 --- a/OpenRA.Mods.RA/Widgets/RadarBinWidget.cs +++ b/OpenRA.Mods.RA/Widgets/RadarBinWidget.cs @@ -105,10 +105,10 @@ namespace OpenRA.Mods.RA.Widgets Location = (loc * Game.CellSize - Game.viewport.Location).ToInt2() }; - Widget.HandleInput(Game.world, fakemi); + Widget.HandleInput(fakemi); fakemi.Event = MouseInputEvent.Up; - Widget.HandleInput(Game.world, fakemi); + Widget.HandleInput(fakemi); } return true;