diff --git a/OpenRA.Mods.RA/Activities/CaptureBuilding.cs b/OpenRA.Mods.RA/Activities/CaptureBuilding.cs index c55374323e..4d5f85c481 100644 --- a/OpenRA.Mods.RA/Activities/CaptureBuilding.cs +++ b/OpenRA.Mods.RA/Activities/CaptureBuilding.cs @@ -23,7 +23,9 @@ namespace OpenRA.Mods.RA.Activities public IActivity Tick(Actor self) { if (target == null || target.IsDead()) return NextActivity; - + if ((target.Location - self.Location).Length > 1) + return NextActivity; + target.World.AddFrameEndTask(w => { // momentarily remove from world so the ownership queries don't get confused diff --git a/OpenRA.Mods.RA/Activities/Demolish.cs b/OpenRA.Mods.RA/Activities/Demolish.cs index 95498ab3eb..688799c610 100644 --- a/OpenRA.Mods.RA/Activities/Demolish.cs +++ b/OpenRA.Mods.RA/Activities/Demolish.cs @@ -26,6 +26,10 @@ namespace OpenRA.Mods.RA.Activities public IActivity Tick(Actor self) { if (target == null || target.IsDead()) return NextActivity; + if ((target.Location - self.Location).Length > 1) + return NextActivity; + + self.World.AddFrameEndTask(w => w.Add(new DelayedAction(25 * 2, () => target.Kill(self)))); return NextActivity;