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:
reaperrr
2016-03-24 15:01:06 +01:00
parent 4894211789
commit 73ec1ec9b2

View File

@@ -130,7 +130,7 @@ namespace OpenRA.Mods.Common.Activities
int CalculateTurnRadius(int speed)
{
return (int)(141 * speed / planeInfo.TurnSpeed / (float)Math.PI);
return 45 * speed / planeInfo.TurnSpeed;
}
}
}