From f425cbe0a4d9a1c730866a8caa649edf374485bc Mon Sep 17 00:00:00 2001 From: Paul Chote Date: Sun, 8 Oct 2017 15:00:41 +0100 Subject: [PATCH] Fix double-chronoshift return location exploit. --- OpenRA.Mods.Cnc/Traits/Chronoshiftable.cs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/OpenRA.Mods.Cnc/Traits/Chronoshiftable.cs b/OpenRA.Mods.Cnc/Traits/Chronoshiftable.cs index d2971bc941..ed3037472d 100644 --- a/OpenRA.Mods.Cnc/Traits/Chronoshiftable.cs +++ b/OpenRA.Mods.Cnc/Traits/Chronoshiftable.cs @@ -101,8 +101,14 @@ namespace OpenRA.Mods.Cnc.Traits } // Set up return-to-origin info - Origin = self.Location; - ReturnTicks = duration; + // If this actor is already counting down to return to + // an existing location then we shouldn't override it + if (ReturnTicks <= 0) + { + Origin = self.Location; + ReturnTicks = duration; + } + this.duration = duration; this.chronosphere = chronosphere; this.killCargo = killCargo;