Merge pull request #10594 from abcdefg30/sizeD2k

Fix a crash in d2k caused by empty bounds
This commit is contained in:
Oliver Brakmann
2016-01-26 19:30:30 +01:00

View File

@@ -183,14 +183,18 @@ namespace OpenRA.Mods.Common.Traits
{
self.World.ActorMap.AddInfluence(self, this);
self.World.ActorMap.AddPosition(self, this);
self.World.ScreenMap.Add(self);
if (!self.Bounds.Size.IsEmpty)
self.World.ScreenMap.Add(self);
}
public void RemovedFromWorld(Actor self)
{
self.World.ActorMap.RemoveInfluence(self, this);
self.World.ActorMap.RemovePosition(self, this);
self.World.ScreenMap.Remove(self);
if (!self.Bounds.Size.IsEmpty)
self.World.ScreenMap.Remove(self);
}
public void NotifyBuildingComplete(Actor self)