fixing another crash.

This commit is contained in:
Bob
2010-01-17 14:23:49 +13:00
parent d60cc6deb0
commit 55ebd1deae
2 changed files with 3 additions and 3 deletions

View File

@@ -23,9 +23,9 @@ namespace OpenRa
public int Health; public int Health;
IActivity currentActivity; 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; Location = location;
CenterLocation = Traits.Util.CenterOfCell(Location); CenterLocation = Traits.Util.CenterOfCell(Location);
Owner = owner; Owner = owner;

View File

@@ -38,7 +38,7 @@ namespace OpenRa
public Actor CreateActor( string name, int2 location, Player owner ) 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 ); Add( a );
return a; return a;
} }