Convert actor speed to world coordinates.

This commit is contained in:
Paul Chote
2013-12-25 19:23:16 +13:00
parent c7914ec68f
commit 0b8dafcdf0
3 changed files with 3 additions and 3 deletions

View File

@@ -154,7 +154,7 @@ namespace OpenRA.Mods.RA.Air
public WVec FlyStep(int facing)
{
var speed = MovementSpeed * 7 * 1024 / (Game.CellSize * 32);
var speed = MovementSpeed;
var dir = new WVec(0, -1024, 0).Rotate(WRot.FromFacing(facing));
return speed * dir / 1024;
}

View File

@@ -58,7 +58,7 @@ namespace OpenRA.Mods.RA.Air
var approachStart = landPos + new WVec(-landDistance, 0, altitude);
// Add 10% to the turning radius to ensure we have enough room
var speed = plane.MovementSpeed * 1024 / (Game.CellSize * 5);
var speed = plane.MovementSpeed * 32 / 35;
var turnRadius = (int)(141 * speed / planeInfo.ROT / (float)Math.PI);
// Find the center of the turning circles for clockwise and counterclockwise turns

View File

@@ -444,7 +444,7 @@ namespace OpenRA.Mods.RA.Move
decimal speed = Info.Speed * Info.TerrainSpeeds[type].Speed;
foreach (var t in self.TraitsImplementing<ISpeedModifier>())
speed *= t.GetSpeedModifier();
return (int)(speed / 100) * 1024 / (3 * Game.CellSize);
return (int)(speed / 100);
}
public void AddInfluence()