From a903cb2cbe541b8252f31b447e5cfc08a7a0074a Mon Sep 17 00:00:00 2001 From: Chris Forbes Date: Sat, 31 Oct 2009 19:02:51 +1300 Subject: [PATCH] added ToString to int2 so it works nicely in debugger; fixed #49 map buildings --- OpenRa.DataStructures/int2.cs | 2 ++ OpenRa.Game/Traits/Building.cs | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/OpenRa.DataStructures/int2.cs b/OpenRa.DataStructures/int2.cs index 1083173118..82a00c956e 100644 --- a/OpenRa.DataStructures/int2.cs +++ b/OpenRa.DataStructures/int2.cs @@ -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); } } } diff --git a/OpenRa.Game/Traits/Building.cs b/OpenRa.Game/Traits/Building.cs index c0793b55e8..0f6d7c4764 100644 --- a/OpenRa.Game/Traits/Building.cs +++ b/OpenRa.Game/Traits/Building.cs @@ -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;