reintroduce Cached<T>; use for Actor.Bounds, Actor.ExtendedBounds, which replace Actor.GetBounds(bool)
This commit is contained in:
@@ -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(true).IntersectsWith(rect));
|
||||
var inBox = actors.Where(x => x.ExtendedBounds.Value.IntersectsWith(rect));
|
||||
|
||||
return inBox.Where(x => (x.CenterLocation - a).LengthSquared < r * r);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user