Update content vectors to numerics (#17759)

This commit is contained in:
metalgearsloth
2023-07-08 14:08:32 +10:00
committed by GitHub
parent 15772478c9
commit 68480af109
383 changed files with 978 additions and 575 deletions

View File

@@ -1,4 +1,5 @@
using System.Linq;
using System.Numerics;
using Content.Server.Administration.Logs;
using Content.Server.Atmos.Components;
using Content.Server.Chat.Managers;
@@ -344,10 +345,10 @@ public sealed partial class ExplosionSystem : EntitySystem
if (delta.EqualsApprox(Vector2.Zero))
delta = new(0.01f, 0);
var distance = delta.Length;
var distance = delta.Length();
var effect = 5 * MathF.Pow(totalIntensity, 0.5f) * (1 - distance / range);
if (effect > 0.01f)
_recoilSystem.KickCamera(uid, -delta.Normalized * effect);
_recoilSystem.KickCamera(uid, -delta.Normalized() * effect);
}
}