Fix invalid Transform location exploit.

This commit is contained in:
Paul Chote
2017-03-04 00:02:51 +00:00
parent 6fbd6bcb4c
commit e98c2eef68

View File

@@ -138,6 +138,12 @@ namespace OpenRA.Mods.Common.Traits
Faction = faction
};
// Try and stop the actor from doing anything between the sanity checks above
// and the actual transform, which we're about to queue.
// TODO: The proper way to do this is to write all the transform code as a nested activity.
if (self.CurrentActivity.NextInQueue != null)
self.CurrentActivity.NextInQueue.Cancel(self);
var makeAnimation = self.TraitOrDefault<WithMakeAnimation>();
if (makeAnimation != null)
makeAnimation.Reverse(self, transform);