From 25962d58c6b4fa0ad1c8a8cc4e19b395aba9f79d Mon Sep 17 00:00:00 2001 From: Mike Bundy Date: Thu, 21 Apr 2011 02:06:58 +0100 Subject: [PATCH] GpsDot removed when actor .Destroyed. GpsDot removed from BADR --- OpenRA.Mods.RA/Effects/GpsDot.cs | 3 +++ mods/ra/rules/aircraft.yaml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/OpenRA.Mods.RA/Effects/GpsDot.cs b/OpenRA.Mods.RA/Effects/GpsDot.cs index 6ec4a7aa9a..4d96d00f21 100644 --- a/OpenRA.Mods.RA/Effects/GpsDot.cs +++ b/OpenRA.Mods.RA/Effects/GpsDot.cs @@ -46,6 +46,9 @@ namespace OpenRA.Mods.RA.Effects public void Tick(World world) { show = false; + + if (self.Destroyed) + world.AddFrameEndTask(w => w.Remove(this)); if (world.LocalPlayer == null) return; diff --git a/mods/ra/rules/aircraft.yaml b/mods/ra/rules/aircraft.yaml index e9d0aa7037..f3cf07b4b3 100644 --- a/mods/ra/rules/aircraft.yaml +++ b/mods/ra/rules/aircraft.yaml @@ -35,6 +35,7 @@ BADR: Offset: -11, -11 Interval: 2 -EjectOnDeath: + -GpsDot: BADR.bomber: CarpetBomb: @@ -74,6 +75,7 @@ BADR.bomber: Offset: -11, -11 Interval: 2 -EjectOnDeath: + -GpsDot: MIG: Inherits: ^Plane