Remove fp from CenterLocation and aircraft.

This commit is contained in:
Paul Chote
2011-01-01 13:21:22 +13:00
parent d395c5e05d
commit 60e3f7621f
13 changed files with 26 additions and 25 deletions

View File

@@ -17,11 +17,11 @@ namespace OpenRA.Mods.RA.Air
{
public class Fly : CancelableActivity
{
public readonly float2 Pos;
public readonly int2 Pos;
private Fly( float2 px ) { Pos = px; }
private Fly( int2 px ) { Pos = px; }
public static Fly ToPx( float2 px ) { return new Fly( px ); }
public static Fly ToPx( int2 px ) { return new Fly( px ); }
public static Fly ToCell( int2 pos ) { return new Fly( Util.CenterOfCell( pos ) ); }
public override IActivity Tick(Actor self)

View File

@@ -20,7 +20,7 @@ namespace OpenRA.Mods.RA.Air
bool isCalculated;
Actor dest;
float2 w1, w2, w3; /* tangent points to turn circles */
int2 w1, w2, w3; /* tangent points to turn circles */
public static Actor ChooseAirfield(Actor self)
{
@@ -74,9 +74,9 @@ namespace OpenRA.Mods.RA.Air
if (f.X > 0) f = -f;
w1 = c1 + f;
w2 = c2 + f;
w3 = approachStart;
w1 = (c1 + f).ToInt2();
w2 = (c2 + f).ToInt2();
w3 = (approachStart).ToInt2();
isCalculated = true;
}