Removes CannyFastMath usage from Atmos.
This commit is contained in:
@@ -11,8 +11,6 @@ using Robust.Shared.IoC;
|
||||
using Robust.Shared.Prototypes;
|
||||
using Robust.Shared.Serialization;
|
||||
using Robust.Shared.ViewVariables;
|
||||
using Math = CannyFastMath.Math;
|
||||
using MathF = CannyFastMath.MathF;
|
||||
|
||||
namespace Content.Server.Atmos
|
||||
{
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#nullable enable
|
||||
using System;
|
||||
using Content.Server.GameObjects.Components.Atmos;
|
||||
using Robust.Shared.GameObjects.Components;
|
||||
using Robust.Shared.Interfaces.Physics;
|
||||
@@ -8,8 +9,6 @@ using Robust.Shared.Map;
|
||||
using Robust.Shared.Maths;
|
||||
using Robust.Shared.Physics;
|
||||
using Robust.Shared.Random;
|
||||
using Logger = Robust.Shared.Log.Logger;
|
||||
using MathF = CannyFastMath.MathF;
|
||||
|
||||
namespace Content.Server.Atmos
|
||||
{
|
||||
@@ -52,13 +51,13 @@ namespace Content.Server.Atmos
|
||||
|
||||
if (maxForce > ThrowForce && throwTarget != GridCoordinates.InvalidGrid)
|
||||
{
|
||||
var moveForce = MathF.Min(maxForce * MathF.Clamp(moveProb, 0, 100) / 100f, 50f);
|
||||
var moveForce = MathF.Min(maxForce * Math.Clamp(moveProb, 0, 100) / 100f, 50f);
|
||||
var pos = throwTarget.Position - transform.GridPosition.Position;
|
||||
LinearVelocity = pos * moveForce;
|
||||
}
|
||||
else
|
||||
{
|
||||
var moveForce = MathF.Min(maxForce * MathF.Clamp(moveProb, 0, 100) / 100f, 25f);
|
||||
var moveForce = MathF.Min(maxForce * Math.Clamp(moveProb, 0, 100) / 100f, 25f);
|
||||
LinearVelocity = direction.ToVec() * moveForce;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#nullable enable
|
||||
using CannyFastMath;
|
||||
using System;
|
||||
using Content.Server.Interfaces;
|
||||
using Content.Shared.Atmos;
|
||||
using JetBrains.Annotations;
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
using System.Runtime.CompilerServices;
|
||||
using CannyFastMath;
|
||||
using System;
|
||||
using System.Runtime.CompilerServices;
|
||||
using Content.Server.GameObjects.Components.Mobs;
|
||||
using Content.Server.GameObjects.EntitySystems;
|
||||
using Content.Server.Interfaces.GameObjects;
|
||||
|
||||
Reference in New Issue
Block a user