added ToString to int2 so it works nicely in debugger; fixed #49 map buildings
This commit is contained in:
@@ -43,5 +43,7 @@ namespace OpenRa
|
|||||||
public Point ToPoint() { return new Point(X, Y); }
|
public Point ToPoint() { return new Point(X, Y); }
|
||||||
public PointF ToPointF() { return new PointF(X, Y); }
|
public PointF ToPointF() { return new PointF(X, Y); }
|
||||||
public float2 ToFloat2() { return new float2(X, Y); }
|
public float2 ToFloat2() { return new float2(X, Y); }
|
||||||
|
|
||||||
|
public override string ToString() { return string.Format("({0},{1})", X, Y); }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ namespace OpenRa.Game.Traits
|
|||||||
bool first = true;
|
bool first = true;
|
||||||
public void Tick(Actor self)
|
public void Tick(Actor self)
|
||||||
{
|
{
|
||||||
if (first && self.Owner == Game.LocalPlayer)
|
if (first)
|
||||||
self.CenterLocation = Game.CellSize * (float2)self.Location + 0.5f * self.SelectedSize;
|
self.CenterLocation = Game.CellSize * (float2)self.Location + 0.5f * self.SelectedSize;
|
||||||
|
|
||||||
first = false;
|
first = false;
|
||||||
|
|||||||
Reference in New Issue
Block a user