Merge pull request #12886 from pchote/fix-transform-exploit

Fix invalid Transform location exploit.
This commit is contained in:
abcdefg30
2017-03-04 15:54:46 +01:00
committed by GitHub

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);