Removes CannyFastMath usage from Atmos.

This commit is contained in:
Víctor Aguilera Puerto
2020-08-12 19:37:07 +02:00
parent cdc6ec3bfc
commit 1fc941b3b3
5 changed files with 8 additions and 13 deletions

View File

@@ -18,8 +18,6 @@ using Robust.Shared.Map;
using Robust.Shared.Maths;
using Robust.Shared.Random;
using Robust.Shared.ViewVariables;
using Logger = Robust.Shared.Log.Logger;
using MathF = CannyFastMath.MathF;
namespace Content.Server.Atmos
{
@@ -140,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(MathF.Clamp(PressureDifference / 10, 10, 100)));
GridIndices.ToGridCoordinates(_mapManager, GridIndex), AudioHelpers.WithVariation(0.125f).WithVolume(Math.Clamp(PressureDifference / 10, 10, 100)));
}
@@ -812,7 +810,7 @@ namespace Content.Server.Atmos
private void HandleDecompressionFloorRip(float sum)
{
if (sum > 20 && _robustRandom.Prob(MathF.Clamp(sum / 100, 0.005f, 0.5f)))
if (sum > 20 && _robustRandom.Prob(Math.Clamp(sum / 100, 0.005f, 0.5f)))
_gridAtmosphereComponent.PryTile(GridIndices);
}