Singleplayer campaign support: player/world init

This commit is contained in:
Paul Chote
2010-08-16 15:19:53 +12:00
parent d6f0a03270
commit 56b0da0b13
13 changed files with 155 additions and 49 deletions

View File

@@ -18,14 +18,14 @@ namespace OpenRA.Mods.RA
public class SpawnMapActors : IGameStarted
{
public Dictionary<string, Actor> MapActors = new Dictionary<string, Actor>();
public Dictionary<string, Actor> Actors = new Dictionary<string, Actor>();
public void GameStarted(World world)
{
Game.skipMakeAnims = true; // rude hack
foreach (var actorReference in world.Map.Actors)
MapActors[actorReference.Key] = world.CreateActor(actorReference.Value.Type, actorReference.Value.InitDict);
Actors[actorReference.Key] = world.CreateActor(actorReference.Value.Type, actorReference.Value.InitDict);
Game.skipMakeAnims = false;
}