diff --git a/OpenRA.Game/Server/Server.cs b/OpenRA.Game/Server/Server.cs index dbfa8f8639..e126082bae 100644 --- a/OpenRA.Game/Server/Server.cs +++ b/OpenRA.Game/Server/Server.cs @@ -66,7 +66,7 @@ namespace OpenRA.Server lobbyInfo.GlobalSettings.RandomSeed = randomSeed; lobbyInfo.GlobalSettings.Map = map; lobbyInfo.GlobalSettings.AllowCheats = settings.Server.AllowCheats; - + LoadMap(); // populates the Session's slots, too. Log.Write("server", "Initial mods: "); @@ -113,6 +113,8 @@ namespace OpenRA.Server } } } ) { IsBackground = true }.Start(); + + } static Session.Slot MakeSlotFromPlayerReference(PlayerReference pr) @@ -454,7 +456,7 @@ namespace OpenRA.Server SendChatTo( conn, "Only the host can change the map" ); return true; } - lobbyInfo.GlobalSettings.Map = s; + lobbyInfo.GlobalSettings.Map = s; LoadMap(); foreach(var client in lobbyInfo.Clients) diff --git a/OpenRA.Mods.RA/World/HackyAI.cs b/OpenRA.Mods.RA/World/HackyAI.cs index 7edd76c9b2..e8edb3b8ed 100644 --- a/OpenRA.Mods.RA/World/HackyAI.cs +++ b/OpenRA.Mods.RA/World/HackyAI.cs @@ -48,7 +48,15 @@ namespace OpenRA.Mods.RA public void GameStarted(World w) { - p = Game.world.LocalPlayer; + try + { + p = Game.world.players.First(c => c.Value.PlayerName.Equals("bot")).Value; + } + catch (Exception) + { + //Could not find a bot. + } + //p = Game.world.LocalPlayer; enabled = Game.IsHost && p != null; if (enabled) {