Add Actor.ReplacedByActor to track transformations.

This isn't great conceptually, but has precedent
in the Generation number.
This commit is contained in:
Paul Chote
2018-11-27 22:29:06 +00:00
committed by Oliver Brakmann
parent 2ac7e451b4
commit 0406b89a96
2 changed files with 3 additions and 0 deletions

View File

@@ -48,6 +48,7 @@ namespace OpenRA
public Activity CurrentActivity { get; private set; }
public int Generation;
public Actor ReplacedByActor;
public IEffectiveOwner EffectiveOwner { get; private set; }
public IOccupySpace OccupiesSpace { get; private set; }

View File

@@ -132,6 +132,8 @@ namespace OpenRA.Mods.Common.Activities
foreach (var nt in self.TraitsImplementing<INotifyTransform>())
nt.AfterTransform(a);
self.ReplacedByActor = a;
if (selected)
w.Selection.Add(w, a);