remove world arg to SyncLobbyInfo and HandleInput
This commit is contained in:
@@ -163,15 +163,15 @@ namespace OpenRA
|
|||||||
|
|
||||||
internal static event Action LobbyInfoChanged = () => { };
|
internal static event Action LobbyInfoChanged = () => { };
|
||||||
|
|
||||||
internal static void SyncLobbyInfo( World world, string data)
|
internal static void SyncLobbyInfo( string data)
|
||||||
{
|
{
|
||||||
LobbyInfo = Session.Deserialize(data);
|
LobbyInfo = Session.Deserialize(data);
|
||||||
|
|
||||||
if( !world.GameHasStarted )
|
//if( !world.GameHasStarted )
|
||||||
world.SharedRandom = new XRandom( LobbyInfo.GlobalSettings.RandomSeed );
|
// world.SharedRandom = new XRandom( LobbyInfo.GlobalSettings.RandomSeed );
|
||||||
|
|
||||||
if (orderManager.Connection.ConnectionState == ConnectionState.Connected)
|
//if (orderManager.Connection.ConnectionState == ConnectionState.Connected)
|
||||||
world.SetLocalPlayer(orderManager.Connection.LocalClientId);
|
// world.SetLocalPlayer(orderManager.Connection.LocalClientId);
|
||||||
|
|
||||||
if (orderManager.FramesAhead != LobbyInfo.GlobalSettings.OrderLatency
|
if (orderManager.FramesAhead != LobbyInfo.GlobalSettings.OrderLatency
|
||||||
&& !orderManager.GameStarted)
|
&& !orderManager.GameStarted)
|
||||||
@@ -217,7 +217,7 @@ namespace OpenRA
|
|||||||
Location = new int2( e.Location ),
|
Location = new int2( e.Location ),
|
||||||
Modifiers = modifierKeys,
|
Modifiers = modifierKeys,
|
||||||
};
|
};
|
||||||
Widget.HandleInput( world, mi );
|
Widget.HandleInput( mi );
|
||||||
} );
|
} );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ namespace OpenRA.Network
|
|||||||
}
|
}
|
||||||
case "SyncInfo":
|
case "SyncInfo":
|
||||||
{
|
{
|
||||||
Game.SyncLobbyInfo( world, order.TargetString);
|
Game.SyncLobbyInfo( order.TargetString);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case "SetStance":
|
case "SetStance":
|
||||||
|
|||||||
@@ -196,7 +196,7 @@ namespace OpenRA.Widgets
|
|||||||
|
|
||||||
public virtual bool HandleInputInner(MouseInput mi) { return !ClickThrough; }
|
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;
|
bool handled = false;
|
||||||
if (SelectedWidget != null && SelectedWidget.HandleMouseInputOuter(mi))
|
if (SelectedWidget != null && SelectedWidget.HandleMouseInputOuter(mi))
|
||||||
|
|||||||
@@ -105,10 +105,10 @@ namespace OpenRA.Mods.RA.Widgets
|
|||||||
Location = (loc * Game.CellSize - Game.viewport.Location).ToInt2()
|
Location = (loc * Game.CellSize - Game.viewport.Location).ToInt2()
|
||||||
};
|
};
|
||||||
|
|
||||||
Widget.HandleInput(Game.world, fakemi);
|
Widget.HandleInput(fakemi);
|
||||||
|
|
||||||
fakemi.Event = MouseInputEvent.Up;
|
fakemi.Event = MouseInputEvent.Up;
|
||||||
Widget.HandleInput(Game.world, fakemi);
|
Widget.HandleInput(fakemi);
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
Reference in New Issue
Block a user