Remove fp from CenterLocation and aircraft.

This commit is contained in:
Paul Chote
2011-01-01 13:21:22 +13:00
parent d395c5e05d
commit 60e3f7621f
13 changed files with 26 additions and 25 deletions

View File

@@ -116,11 +116,10 @@ namespace OpenRA.Graphics
{
if (!actors.Any()) return;
var avgPos = (1f / actors.Count()) * actors
var avgPos = actors
.Select(a => a.CenterLocation)
.Aggregate((a, b) => a + b);
scrollPosition = this.NormalizeScrollPosition((avgPos.ToInt2() - screenSize / 2));
.Aggregate((a, b) => a + b) / actors.Count();
scrollPosition = this.NormalizeScrollPosition((avgPos - screenSize / 2));
}
public Rectangle ViewBounds(World world)