Fix TD gunboat not updating actor map influence.

This commit is contained in:
Matthias Mailänder
2020-05-06 20:20:15 +02:00
committed by abcdefg30
parent 10aac03f75
commit b7cee41c54

View File

@@ -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)