From b7cee41c5407a67581a23b14c5028fa720fc4208 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Mail=C3=A4nder?= Date: Wed, 6 May 2020 20:20:15 +0200 Subject: [PATCH] Fix TD gunboat not updating actor map influence. --- OpenRA.Mods.Cnc/Traits/TDGunboat.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/OpenRA.Mods.Cnc/Traits/TDGunboat.cs b/OpenRA.Mods.Cnc/Traits/TDGunboat.cs index d315d1b5c5..715acbf4f3 100644 --- a/OpenRA.Mods.Cnc/Traits/TDGunboat.cs +++ b/OpenRA.Mods.Cnc/Traits/TDGunboat.cs @@ -176,12 +176,16 @@ namespace OpenRA.Mods.Cnc.Traits public void SetPosition(Actor self, WPos pos) { + if (self.IsInWorld) + self.World.ActorMap.RemoveInfluence(self, this); + CenterPosition = pos; if (!self.IsInWorld) return; self.World.UpdateMaps(self, this); + self.World.ActorMap.AddInfluence(self, this); // This can be called from the constructor before notifyVisualPositionChanged is assigned. if (notifyVisualPositionChanged != null)