diff --git a/OpenRa.Game/Actor.cs b/OpenRa.Game/Actor.cs index 03a6b689ad..7544ff72cb 100755 --- a/OpenRa.Game/Actor.cs +++ b/OpenRa.Game/Actor.cs @@ -23,9 +23,9 @@ namespace OpenRa public int Health; IActivity currentActivity; - public Actor( string name, int2 location, Player owner ) + public Actor( World world, string name, int2 location, Player owner ) { - ActorID = Game.world.NextAID(); + ActorID = world.NextAID(); Location = location; CenterLocation = Traits.Util.CenterOfCell(Location); Owner = owner; diff --git a/OpenRa.Game/World.cs b/OpenRa.Game/World.cs index 08fb2c6268..81e8cca111 100644 --- a/OpenRa.Game/World.cs +++ b/OpenRa.Game/World.cs @@ -38,7 +38,7 @@ namespace OpenRa public Actor CreateActor( string name, int2 location, Player owner ) { - var a = new Actor( name, location, owner ); + var a = new Actor( this, name, location, owner ); Add( a ); return a; }