Replace dynamic Actor.Bounds with the (unchanging) relative rect.

This commit is contained in:
Paul Chote
2013-09-21 17:15:46 +12:00
parent 3f8d75a1ac
commit ad44610e5a
6 changed files with 77 additions and 78 deletions

View File

@@ -40,7 +40,9 @@ namespace OpenRA.Traits
if (!Info.Selectable)
return;
var pos = wr.ScreenPxPosition(self.CenterPosition);
var bounds = self.Bounds.Value;
bounds.Offset(pos.X, pos.Y);
var xy = new float2(bounds.Left, bounds.Top);
var Xy = new float2(bounds.Right, bounds.Top);
@@ -56,7 +58,9 @@ namespace OpenRA.Traits
if (!Info.Selectable)
return;
var pos = wr.ScreenPxPosition(self.CenterPosition);
var bounds = self.Bounds.Value;
bounds.Offset(pos.X, pos.Y);
var xy = new float2(bounds.Left, bounds.Top);
var Xy = new float2(bounds.Right, bounds.Top);