Kill Map.XOffset / Map.YOffset.

This commit is contained in:
Paul Chote
2010-11-24 10:26:38 +13:00
parent 00dc91cf49
commit f11bcd27cc
8 changed files with 31 additions and 33 deletions

View File

@@ -49,10 +49,10 @@ namespace OpenRA.Traits
{
var bounds = a.Actor.GetBounds(true);
if (bounds.Right <= Game.CellSize * self.World.Map.XOffset) continue;
if (bounds.Bottom <= Game.CellSize * self.World.Map.YOffset) continue;
if (bounds.Left >= Game.CellSize * (self.World.Map.XOffset + self.World.Map.Width)) continue;
if (bounds.Top >= Game.CellSize * (self.World.Map.YOffset + self.World.Map.Height)) continue;
if (bounds.Right <= Game.CellSize * self.World.Map.TopLeft.X) continue;
if (bounds.Bottom <= Game.CellSize * self.World.Map.TopLeft.Y) continue;
if (bounds.Left >= Game.CellSize * self.World.Map.BottomRight.X) continue;
if (bounds.Top >= Game.CellSize * self.World.Map.BottomRight.Y) continue;
var i1 = Math.Max(0, (int)bounds.Left / scale);
var i2 = Math.Min(bins.GetUpperBound(0), (int)bounds.Right / scale);