Remove CannyFastMath.

This commit is contained in:
Pieter-Jan Briers
2020-08-12 21:09:56 +02:00
parent 3ca3b5e684
commit f182ff5613
15 changed files with 64 additions and 81 deletions

View File

@@ -51,13 +51,13 @@ namespace Content.Server.Atmos
if (maxForce > ThrowForce && throwTarget != GridCoordinates.InvalidGrid)
{
var moveForce = MathF.Min(maxForce * Math.Clamp(moveProb, 0, 100) / 100f, 50f);
var moveForce = MathF.Min(maxForce * FloatMath.Clamp(moveProb, 0, 100) / 100f, 50f);
var pos = throwTarget.Position - transform.GridPosition.Position;
LinearVelocity = pos * moveForce;
}
else
{
var moveForce = MathF.Min(maxForce * Math.Clamp(moveProb, 0, 100) / 100f, 25f);
var moveForce = MathF.Min(maxForce * FloatMath.Clamp(moveProb, 0, 100) / 100f, 25f);
LinearVelocity = direction.ToVec() * moveForce;
}