Simplify ScreenMap bounds checking.
This commit is contained in:
@@ -313,9 +313,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
|
||||
self.World.ActorMap.AddInfluence(self, this);
|
||||
self.World.ActorMap.AddPosition(self, this);
|
||||
|
||||
if (!self.RenderBounds.Size.IsEmpty)
|
||||
self.World.ScreenMap.Add(self);
|
||||
self.World.ScreenMap.Add(self);
|
||||
|
||||
influence.AddInfluence(self, Info.Tiles(self.Location));
|
||||
}
|
||||
@@ -324,9 +322,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
{
|
||||
self.World.ActorMap.RemoveInfluence(self, this);
|
||||
self.World.ActorMap.RemovePosition(self, this);
|
||||
|
||||
if (!self.RenderBounds.Size.IsEmpty)
|
||||
self.World.ScreenMap.Remove(self);
|
||||
self.World.ScreenMap.Remove(self);
|
||||
|
||||
influence.RemoveInfluence(self, Info.Tiles(self.Location));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user