first step; doesnt work yet

This commit is contained in:
Chris Forbes
2010-03-17 19:40:02 +13:00
parent e1970ea8f0
commit ed2e70eb9c
2 changed files with 4 additions and 3 deletions

View File

@@ -267,6 +267,10 @@ namespace OpenRA
if( Game.orderManager.GameStarted ) return; if( Game.orderManager.GameStarted ) return;
Game.chat.Reset(); 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<IGameStarted>()) foreach (var gs in Game.world.WorldActor.traits.WithInterface<IGameStarted>())
gs.GameStarted(world); gs.GameStarted(world);

View File

@@ -97,9 +97,6 @@ namespace OpenRA
WorldActor = CreateActor("World", new int2(int.MaxValue, int.MaxValue), null); 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}" ); Timer.Time( "worldActor, players: {0}" );
Queries = new AllQueries( this ); Queries = new AllQueries( this );