diff --git a/OpenRA.Game/Traits/TraitsInterfaces.cs b/OpenRA.Game/Traits/TraitsInterfaces.cs index 2f7d3504ed..c94378a8fe 100755 --- a/OpenRA.Game/Traits/TraitsInterfaces.cs +++ b/OpenRA.Game/Traits/TraitsInterfaces.cs @@ -214,11 +214,11 @@ namespace OpenRA.Traits public struct Target // a target: either an actor, or a fixed location. { Actor actor; - float2 pos; + int2 pos; bool valid; public static Target FromActor(Actor a) { return new Target { actor = a, valid = (a != null) }; } - public static Target FromPos(float2 p) { return new Target { pos = p, valid = true }; } + public static Target FromPos(int2 p) { return new Target { pos = p, valid = true }; } public static Target FromCell(int2 c) { return new Target { pos = Util.CenterOfCell(c), valid = true }; } public static Target FromOrder(Order o) { @@ -230,7 +230,7 @@ namespace OpenRA.Traits public static readonly Target None = new Target(); public bool IsValid { get { return valid && (actor == null || actor.IsInWorld); } } - public int2 PxPosition { get { return IsActor ? actor.Trait().PxPosition : pos.ToInt2(); } } + public int2 PxPosition { get { return IsActor ? actor.Trait().PxPosition : pos; } } public int2 CenterLocation { get { return PxPosition; } } public Actor Actor { get { return IsActor ? actor : null; } } diff --git a/OpenRA.Mods.RA/Combat.cs b/OpenRA.Mods.RA/Combat.cs index 064728cdcf..7891c05669 100755 --- a/OpenRA.Mods.RA/Combat.cs +++ b/OpenRA.Mods.RA/Combat.cs @@ -112,12 +112,12 @@ namespace OpenRA.Mods.RA } } - public static void DoExplosion(Actor attacker, string weapontype, float2 pos, int altitude) + public static void DoExplosion(Actor attacker, string weapontype, int2 pos, int altitude) { var args = new ProjectileArgs { - src = pos.ToInt2(), - dest = pos.ToInt2(), + src = pos, + dest = pos, srcAltitude = altitude, destAltitude = altitude, firedBy = attacker, diff --git a/OpenRA.Mods.RA/Effects/NukeLaunch.cs b/OpenRA.Mods.RA/Effects/NukeLaunch.cs index 330d7a3a4c..20ee4b03ac 100755 --- a/OpenRA.Mods.RA/Effects/NukeLaunch.cs +++ b/OpenRA.Mods.RA/Effects/NukeLaunch.cs @@ -20,7 +20,7 @@ namespace OpenRA.Mods.RA.Effects readonly Player firedBy; readonly Actor silo; Animation anim; - float2 pos; + int2 pos; int2 targetLocation; int altitude; bool goingUp = true; diff --git a/OpenRA.Mods.RA/UnitStances/UnitStanceDefensive.cs b/OpenRA.Mods.RA/UnitStances/UnitStanceDefensive.cs index 39fabd7c22..6337c69796 100644 --- a/OpenRA.Mods.RA/UnitStances/UnitStanceDefensive.cs +++ b/OpenRA.Mods.RA/UnitStances/UnitStanceDefensive.cs @@ -48,7 +48,7 @@ namespace OpenRA.Mods.RA WaitForIdle(); } - protected void DefendThis(float2 target) + protected void DefendThis(int2 target) { DefendTarget = Target.FromPos(target); TargetType = ETargetType.Location;