Fix the in range check

This commit is contained in:
alzeih
2010-07-22 13:27:41 +12:00
parent 3395f97b20
commit 4e22e37192
2 changed files with 5 additions and 3 deletions

View File

@@ -170,7 +170,7 @@ namespace OpenRA.Traits
public static readonly Target None = new Target();
public bool IsValid { get { return valid && (actor == null || actor.IsInWorld); } }
public float2 CenterLocation { get { return actor != null ? actor.CenterLocation : pos; } }
public float2 CenterLocation { get { return actor != null ? actor.CenterLocation : Util.CenterOfCell(pos.ToInt2()); } }
public Actor Actor { get { return actor; } }
public bool IsActor { get { return actor != null; } }