Merge pull request #8226 from pchote/actor-disposal

Dispose traits when destroying an actor.
This commit is contained in:
Oliver Brakmann
2015-06-02 19:33:22 +02:00
54 changed files with 138 additions and 81 deletions

View File

@@ -87,7 +87,7 @@ namespace OpenRA.Mods.Common.Traits
void ActorEntered(Actor a)
{
if (a.Destroyed)
if (a.Disposed)
return;
if (a == self && !info.AffectsParent)
@@ -122,7 +122,7 @@ namespace OpenRA.Mods.Common.Traits
void ActorExited(Actor a)
{
if (a == self || a.Destroyed)
if (a == self || a.Disposed)
return;
var stance = self.Owner.Stances[a.Owner];