added ToString to int2 so it works nicely in debugger; fixed #49 map buildings

This commit is contained in:
Chris Forbes
2009-10-31 19:02:51 +13:00
parent 8cd7106e4f
commit a903cb2cbe
2 changed files with 3 additions and 1 deletions

View File

@@ -43,5 +43,7 @@ namespace OpenRa
public Point ToPoint() { return new Point(X, Y); }
public PointF ToPointF() { return new PointF(X, Y); }
public float2 ToFloat2() { return new float2(X, Y); }
public override string ToString() { return string.Format("({0},{1})", X, Y); }
}
}

View File

@@ -14,7 +14,7 @@ namespace OpenRa.Game.Traits
bool first = true;
public void Tick(Actor self)
{
if (first && self.Owner == Game.LocalPlayer)
if (first)
self.CenterLocation = Game.CellSize * (float2)self.Location + 0.5f * self.SelectedSize;
first = false;