From 5cd111d210435e5c5c8c158557d866f7d89a3dab Mon Sep 17 00:00:00 2001 From: Leon Friedrich <60421075+ElectroJr@users.noreply.github.com> Date: Fri, 28 Oct 2022 10:00:30 +1300 Subject: [PATCH] Fix lag compensation exception (#12243) --- Content.Server/Movement/Systems/LagCompensationSystem.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Content.Server/Movement/Systems/LagCompensationSystem.cs b/Content.Server/Movement/Systems/LagCompensationSystem.cs index 6ffd55c6b9..9b30372696 100644 --- a/Content.Server/Movement/Systems/LagCompensationSystem.cs +++ b/Content.Server/Movement/Systems/LagCompensationSystem.cs @@ -57,6 +57,9 @@ public sealed class LagCompensationSystem : EntitySystem private void OnLagMove(EntityUid uid, LagCompensationComponent component, ref MoveEvent args) { + if (!args.NewPosition.EntityId.IsValid()) + return; // probably being sent to nullspace for deletion. + EnsureComp(uid); component.Positions.Enqueue((_timing.CurTime, args.NewPosition, args.NewRotation)); }