From 56332251f5216de811ef192e0c9bd4fadd69f88f Mon Sep 17 00:00:00 2001 From: Paul Chote Date: Sat, 27 Sep 2014 08:49:44 +1200 Subject: [PATCH] =?UTF-8?q?Don=E2=80=99t=20double-remove=20dead=20actors?= =?UTF-8?q?=20from=20the=20world.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- OpenRA.Game/Actor.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/OpenRA.Game/Actor.cs b/OpenRA.Game/Actor.cs index 066b5277a0..d0fb5e7981 100644 --- a/OpenRA.Game/Actor.cs +++ b/OpenRA.Game/Actor.cs @@ -204,9 +204,12 @@ namespace OpenRA { World.AddFrameEndTask(w => { - if (Destroyed) return; + if (Destroyed) + return; + + if (IsInWorld) + World.Remove(this); - World.Remove(this); World.traitDict.RemoveActor(this); Destroyed = true; });