Update content vectors to numerics (#17759)
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
using System.Numerics;
|
||||
|
||||
namespace Content.Server.Shuttles.Components
|
||||
{
|
||||
[RegisterComponent]
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
using System.Numerics;
|
||||
using Content.Shared.Shuttles.Components;
|
||||
|
||||
namespace Content.Server.Shuttles.Components
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
using System.Numerics;
|
||||
using Content.Server.Shuttles.Systems;
|
||||
using Content.Shared.Construction.Prototypes;
|
||||
using Content.Shared.Damage;
|
||||
|
||||
@@ -62,7 +62,7 @@ public sealed partial class DockingSystem
|
||||
var worldPos = _transform.GetWorldPosition(xform, xformQuery);
|
||||
var otherWorldPos = _transform.GetWorldPosition(otherXform, xformQuery);
|
||||
|
||||
if ((worldPos - otherWorldPos).Length < comp.Radius)
|
||||
if ((worldPos - otherWorldPos).Length() < comp.Radius)
|
||||
continue;
|
||||
|
||||
_sawmill.Debug($"Removed RecentlyDocked from {ToPrettyString(uid)} and {ToPrettyString(comp.LastDocked)}");
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Linq;
|
||||
using System.Numerics;
|
||||
using Content.Server.Shuttles.Components;
|
||||
using Robust.Shared.Map;
|
||||
using Robust.Shared.Map.Components;
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
using System.Numerics;
|
||||
using Content.Server.Doors.Systems;
|
||||
using Content.Server.NPC.Pathfinding;
|
||||
using Content.Server.Shuttles.Components;
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
using System.Numerics;
|
||||
using System.Threading;
|
||||
using Content.Server.Access.Systems;
|
||||
using Content.Server.Administration.Logs;
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
using System.Numerics;
|
||||
using Content.Server.UserInterface;
|
||||
using Content.Shared.Shuttles.BUIStates;
|
||||
using Content.Shared.Shuttles.Components;
|
||||
|
||||
@@ -9,6 +9,7 @@ using Robust.Shared.Map;
|
||||
using Robust.Shared.Player;
|
||||
using Robust.Shared.Utility;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Numerics;
|
||||
using Content.Server.Shuttles.Events;
|
||||
using Content.Shared.Body.Components;
|
||||
using Content.Shared.Buckle.Components;
|
||||
@@ -541,7 +542,7 @@ public sealed partial class ShuttleSystem
|
||||
}
|
||||
|
||||
var targetAABB = _transform.GetWorldMatrix(targetXform, xformQuery)
|
||||
.TransformBox(targetLocalAABB).Enlarged(shuttleAABB.Size.Length);
|
||||
.TransformBox(targetLocalAABB).Enlarged(shuttleAABB.Size.Length());
|
||||
var nearbyGrids = new HashSet<EntityUid>();
|
||||
var iteration = 0;
|
||||
var lastCount = nearbyGrids.Count;
|
||||
@@ -564,7 +565,7 @@ public sealed partial class ShuttleSystem
|
||||
break;
|
||||
}
|
||||
|
||||
targetAABB = targetAABB.Enlarged(shuttleAABB.Size.Length / 2f);
|
||||
targetAABB = targetAABB.Enlarged(shuttleAABB.Size.Length() / 2f);
|
||||
iteration++;
|
||||
lastCount = nearbyGrids.Count;
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ public sealed partial class ShuttleSystem
|
||||
|
||||
var ourVelocity = _physics.GetLinearVelocity(uid, ourPoint, ourBody, ourXform);
|
||||
var otherVelocity = _physics.GetLinearVelocity(args.OtherEntity, otherPoint, otherBody, otherXform);
|
||||
var jungleDiff = (ourVelocity - otherVelocity).Length;
|
||||
var jungleDiff = (ourVelocity - otherVelocity).Length();
|
||||
|
||||
if (jungleDiff < MinimumImpactVelocity)
|
||||
{
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System.Linq;
|
||||
using System.Numerics;
|
||||
using Content.Server.Audio;
|
||||
using Content.Server.Construction;
|
||||
using Content.Server.Power.Components;
|
||||
|
||||
Reference in New Issue
Block a user