diff --git a/OpenRA.Game/Game.cs b/OpenRA.Game/Game.cs index 197a006231..67674cca98 100644 --- a/OpenRA.Game/Game.cs +++ b/OpenRA.Game/Game.cs @@ -289,8 +289,6 @@ namespace OpenRA if( orderManager.GameStarted ) return; chat.Reset(); - world.AddPlayer(new Player(world, null)); // neutral player - foreach (var c in LobbyInfo.Clients) world.AddPlayer(new Player(world, c)); diff --git a/OpenRA.Game/Traits/World/BridgeLoadHook.cs b/OpenRA.Game/Traits/World/BridgeLoadHook.cs index ae817da1ec..af2ca2b997 100644 --- a/OpenRA.Game/Traits/World/BridgeLoadHook.cs +++ b/OpenRA.Game/Traits/World/BridgeLoadHook.cs @@ -72,7 +72,7 @@ namespace OpenRA.Traits if (replacedTiles.Any()) { - var a = w.CreateActor(template.Bridge, new int2(ni, nj), null); + var a = w.CreateActor(template.Bridge, new int2(ni, nj), w.NeutralPlayer); var br = a.traits.Get(); br.SetTiles(w, template, replacedTiles); } diff --git a/OpenRA.Game/World.cs b/OpenRA.Game/World.cs index b1883ee3b6..2efdceadc3 100644 --- a/OpenRA.Game/World.cs +++ b/OpenRA.Game/World.cs @@ -84,7 +84,8 @@ namespace OpenRA customTerrain = new ICustomTerrain[Map.MapSize, Map.MapSize]; Timer.Time( "new Map: {0}" ); - var theaterInfo = Rules.Info["world"].Traits.WithInterface().FirstOrDefault(t => t.Theater == Map.Theater); + var theaterInfo = Rules.Info["world"].Traits.WithInterface() + .FirstOrDefault(t => t.Theater == Map.Theater); TileSet = new TileSet(theaterInfo.Tileset, theaterInfo.Templates, theaterInfo.Suffix); SpriteSheetBuilder.Initialize( Map ); @@ -94,8 +95,9 @@ namespace OpenRA Timer.Time("renderer: {0}"); WorldActor = CreateActor("World", new int2(int.MaxValue, int.MaxValue), null); + AddPlayer(new Player(this, null)); // add the neutral player - Timer.Time( "worldActor, players: {0}" ); + Timer.Time( "worldActor: {0}" ); foreach (var wlh in WorldActor.traits.WithInterface()) wlh.WorldLoaded(this);