Remove CannyFastMath.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -138,7 +138,7 @@ namespace Content.Server.Atmos
|
||||
{
|
||||
if(_soundCooldown == 0)
|
||||
EntitySystem.Get<AudioSystem>().PlayAtCoords("/Audio/Effects/space_wind.ogg",
|
||||
GridIndices.ToGridCoordinates(_mapManager, GridIndex), AudioHelpers.WithVariation(0.125f).WithVolume(Math.Clamp(PressureDifference / 10, 10, 100)));
|
||||
GridIndices.ToGridCoordinates(_mapManager, GridIndex), AudioHelpers.WithVariation(0.125f).WithVolume(FloatMath.Clamp(PressureDifference / 10, 10, 100)));
|
||||
}
|
||||
|
||||
|
||||
@@ -810,7 +810,7 @@ namespace Content.Server.Atmos
|
||||
|
||||
private void HandleDecompressionFloorRip(float sum)
|
||||
{
|
||||
if (sum > 20 && _robustRandom.Prob(Math.Clamp(sum / 100, 0.005f, 0.5f)))
|
||||
if (sum > 20 && _robustRandom.Prob(FloatMath.Clamp(sum / 100, 0.005f, 0.5f)))
|
||||
_gridAtmosphereComponent.PryTile(GridIndices);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user