Remove float from ReturnToBase.CalculateTurnRadius
141 / PI ~= 44.88, so 45 should be accurate enough. This should reduce desync risk while improving performance of this calculation.
This commit is contained in:
@@ -130,7 +130,7 @@ namespace OpenRA.Mods.Common.Activities
|
|||||||
|
|
||||||
int CalculateTurnRadius(int speed)
|
int CalculateTurnRadius(int speed)
|
||||||
{
|
{
|
||||||
return (int)(141 * speed / planeInfo.TurnSpeed / (float)Math.PI);
|
return 45 * speed / planeInfo.TurnSpeed;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user