more. doesn't run. may not compile

This commit is contained in:
Bob
2010-08-20 09:02:18 +12:00
committed by Chris Forbes
parent 5561ac458b
commit 739c38d3d8
4 changed files with 33 additions and 22 deletions

View File

@@ -212,14 +212,16 @@ namespace OpenRA
World.traitDict.AddTrait( this, trait );
}
public bool Destroyed { get; private set; }
public void Destroy()
{
World.AddFrameEndTask( w => World.Remove( this ) );
World.AddFrameEndTask( w =>
{
World.Remove( this );
World.traitDict.RemoveActor( this );
Destroyed = true;
} );
}
~Actor()
{
World.traitDict.RemoveActor( this );
}
}
}