Fix TD gunboat not updating actor map influence.
This commit is contained in:
committed by
abcdefg30
parent
10aac03f75
commit
b7cee41c54
@@ -176,12 +176,16 @@ namespace OpenRA.Mods.Cnc.Traits
|
|||||||
|
|
||||||
public void SetPosition(Actor self, WPos pos)
|
public void SetPosition(Actor self, WPos pos)
|
||||||
{
|
{
|
||||||
|
if (self.IsInWorld)
|
||||||
|
self.World.ActorMap.RemoveInfluence(self, this);
|
||||||
|
|
||||||
CenterPosition = pos;
|
CenterPosition = pos;
|
||||||
|
|
||||||
if (!self.IsInWorld)
|
if (!self.IsInWorld)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
self.World.UpdateMaps(self, this);
|
self.World.UpdateMaps(self, this);
|
||||||
|
self.World.ActorMap.AddInfluence(self, this);
|
||||||
|
|
||||||
// This can be called from the constructor before notifyVisualPositionChanged is assigned.
|
// This can be called from the constructor before notifyVisualPositionChanged is assigned.
|
||||||
if (notifyVisualPositionChanged != null)
|
if (notifyVisualPositionChanged != null)
|
||||||
|
|||||||
Reference in New Issue
Block a user