remove FP sillyness from FindUnits & friends
This commit is contained in:
@@ -110,6 +110,9 @@ namespace OpenRA.Graphics
|
||||
return ViewToWorld(mi.Location);
|
||||
}
|
||||
|
||||
public int2 ViewToWorldPx(int2 loc) { return loc + Location.ToInt2(); }
|
||||
public int2 ViewToWorldPx(MouseInput mi) { return ViewToWorldPx(mi.Location); }
|
||||
|
||||
public void Center(float2 loc)
|
||||
{
|
||||
scrollPosition = this.NormalizeScrollPosition((Game.CellSize*loc - screenSize / 2).ToInt2());
|
||||
|
||||
@@ -58,8 +58,8 @@ namespace OpenRA.Graphics
|
||||
bounds.Offset((int)Game.viewport.Location.X, (int)Game.viewport.Location.Y);
|
||||
|
||||
var actors = world.FindUnits(
|
||||
new float2(bounds.Left, bounds.Top),
|
||||
new float2(bounds.Right, bounds.Bottom));
|
||||
new int2(bounds.Left, bounds.Top),
|
||||
new int2(bounds.Right, bounds.Bottom));
|
||||
|
||||
var renderables = actors.SelectMany(a => a.Render())
|
||||
.OrderBy(r => r, comparer);
|
||||
|
||||
Reference in New Issue
Block a user