Properly clean up traits that used to hook only death.
This commit is contained in:
@@ -225,6 +225,9 @@ namespace OpenRA
|
||||
if (IsInWorld)
|
||||
World.Remove(this);
|
||||
|
||||
foreach (var t in TraitsImplementing<INotifyActorDisposing>())
|
||||
t.Disposing(this);
|
||||
|
||||
World.TraitDict.RemoveActor(this);
|
||||
Disposed = true;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user