started removing '
players exist before game starts' assumptions
This commit is contained in:
@@ -431,9 +431,8 @@ namespace OpenRa
|
||||
world.Minimap.Draw(minimapRect, true);
|
||||
world.Minimap.DrawSpawnPoints(minimapRect);
|
||||
|
||||
if (Game.world.LocalPlayer.Index == 0)
|
||||
if (Game.IsHost)
|
||||
{
|
||||
// we are host
|
||||
AddUiButton(new int2(r.Right - 100, r.Top + 300), "Change Map",
|
||||
_ =>
|
||||
{
|
||||
|
||||
@@ -324,6 +324,11 @@ namespace OpenRa
|
||||
// throw new InvalidOperationException( "Desync in OnKeyDown" );
|
||||
}
|
||||
|
||||
public static bool IsHost
|
||||
{
|
||||
get { return orderManager.Connection.LocalClientId == 0; }
|
||||
}
|
||||
|
||||
public static void HandleKeyPress( KeyPressEventArgs e, Modifiers modifiers )
|
||||
{
|
||||
int sync = Game.world.SyncHash();
|
||||
|
||||
Reference in New Issue
Block a user