Convert actor speed to world coordinates.
This commit is contained in:
@@ -154,7 +154,7 @@ namespace OpenRA.Mods.RA.Air
|
|||||||
|
|
||||||
public WVec FlyStep(int facing)
|
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));
|
var dir = new WVec(0, -1024, 0).Rotate(WRot.FromFacing(facing));
|
||||||
return speed * dir / 1024;
|
return speed * dir / 1024;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ namespace OpenRA.Mods.RA.Air
|
|||||||
var approachStart = landPos + new WVec(-landDistance, 0, altitude);
|
var approachStart = landPos + new WVec(-landDistance, 0, altitude);
|
||||||
|
|
||||||
// Add 10% to the turning radius to ensure we have enough room
|
// 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);
|
var turnRadius = (int)(141 * speed / planeInfo.ROT / (float)Math.PI);
|
||||||
|
|
||||||
// Find the center of the turning circles for clockwise and counterclockwise turns
|
// Find the center of the turning circles for clockwise and counterclockwise turns
|
||||||
|
|||||||
@@ -444,7 +444,7 @@ namespace OpenRA.Mods.RA.Move
|
|||||||
decimal speed = Info.Speed * Info.TerrainSpeeds[type].Speed;
|
decimal speed = Info.Speed * Info.TerrainSpeeds[type].Speed;
|
||||||
foreach (var t in self.TraitsImplementing<ISpeedModifier>())
|
foreach (var t in self.TraitsImplementing<ISpeedModifier>())
|
||||||
speed *= t.GetSpeedModifier();
|
speed *= t.GetSpeedModifier();
|
||||||
return (int)(speed / 100) * 1024 / (3 * Game.CellSize);
|
return (int)(speed / 100);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void AddInfluence()
|
public void AddInfluence()
|
||||||
|
|||||||
Reference in New Issue
Block a user