Merge pull request #10795 from Mailaender/screenmap-bounds-crash

Fixed screen map updates for invisible mobile actors
This commit is contained in:
Oliver Brakmann
2016-02-27 17:52:49 +01:00
5 changed files with 45 additions and 38 deletions

View File

@@ -106,22 +106,18 @@ namespace OpenRA.Mods.Common.Traits
CenterPosition = pos;
TopLeft = self.World.Map.CellContaining(pos);
self.World.ActorMap.AddInfluence(self, this);
self.World.ActorMap.UpdatePosition(self, this);
self.World.ScreenMap.Update(self);
self.World.UpdateMaps(self, this);
}
public void AddedToWorld(Actor self)
{
self.World.ActorMap.AddInfluence(self, this);
self.World.ActorMap.AddPosition(self, this);
self.World.ScreenMap.Add(self);
self.World.AddToMaps(self, this);
}
public void RemovedFromWorld(Actor self)
{
self.World.ActorMap.RemoveInfluence(self, this);
self.World.ActorMap.RemovePosition(self, this);
self.World.ScreenMap.Remove(self);
self.World.RemoveFromMaps(self, this);
}
public bool Disabled