Fix a subtle bug with flying units in spatialbins. Fixes #489.

This commit is contained in:
Paul Chote
2011-02-01 22:06:09 +13:00
parent 467c2a969d
commit 2daeb45bfe
6 changed files with 17 additions and 11 deletions

View File

@@ -45,7 +45,7 @@ namespace OpenRA
var rect = new RectangleF(min.X, min.Y, max.X - min.X, max.Y - min.Y);
var inBox = actors.Where(x => x.GetBounds(false).IntersectsWith(rect));
var inBox = actors.Where(x => x.GetBounds(true).IntersectsWith(rect));
return inBox.Where(x => (x.CenterLocation - a).LengthSquared < r * r);
}