From ed2e70eb9c0ec7971dcd734183500692fedf6567 Mon Sep 17 00:00:00 2001 From: Chris Forbes Date: Wed, 17 Mar 2010 19:40:02 +1300 Subject: [PATCH] first step; doesnt work yet --- OpenRA.Game/Game.cs | 4 ++++ OpenRA.Game/World.cs | 3 --- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/OpenRA.Game/Game.cs b/OpenRA.Game/Game.cs index dd5b61862d..1a5b3808e3 100644 --- a/OpenRA.Game/Game.cs +++ b/OpenRA.Game/Game.cs @@ -267,6 +267,10 @@ namespace OpenRA if( Game.orderManager.GameStarted ) return; Game.chat.Reset(); + // todo: only spawn a neutral player + a player for each client + for (int i = 0; i < 8; i++) + world.players[i] = new Player(world, i, LobbyInfo.Clients.FirstOrDefault(a => a.Index == i)); + foreach (var gs in Game.world.WorldActor.traits.WithInterface()) gs.GameStarted(world); diff --git a/OpenRA.Game/World.cs b/OpenRA.Game/World.cs index a0663452d1..eaeb00d478 100644 --- a/OpenRA.Game/World.cs +++ b/OpenRA.Game/World.cs @@ -97,9 +97,6 @@ namespace OpenRA WorldActor = CreateActor("World", new int2(int.MaxValue, int.MaxValue), null); - for (int i = 0; i < 8; i++) - players[i] = new Player(this, i, Game.LobbyInfo.Clients.FirstOrDefault(a => a.Index == i)); - Timer.Time( "worldActor, players: {0}" ); Queries = new AllQueries( this );