From ecb044825003f377dc49ec59eca222d796a40dd6 Mon Sep 17 00:00:00 2001 From: DrSmugleaf Date: Wed, 8 Jul 2020 16:39:05 +0200 Subject: [PATCH 1/3] Fix thrown entity deletion crash --- .../Components/Projectiles/ThrownItemComponent.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Content.Server/GameObjects/Components/Projectiles/ThrownItemComponent.cs b/Content.Server/GameObjects/Components/Projectiles/ThrownItemComponent.cs index 357724ba53..53f93e85bb 100644 --- a/Content.Server/GameObjects/Components/Projectiles/ThrownItemComponent.cs +++ b/Content.Server/GameObjects/Components/Projectiles/ThrownItemComponent.cs @@ -1,4 +1,4 @@ -using Content.Server.GameObjects.Components.Projectiles; +using Content.Server.GameObjects.Components.Projectiles; using Content.Server.GameObjects.EntitySystems.Click; using Content.Server.Interfaces.GameObjects.Components.Interaction; using Content.Shared.GameObjects; @@ -49,6 +49,11 @@ namespace Content.Server.GameObjects.Components private void StopThrow() { + if (Owner.Deleted) + { + return; + } + if (Owner.TryGetComponent(out CollidableComponent body) && body.PhysicsShapes.Count >= 1) { body.PhysicsShapes[0].CollisionMask &= (int) ~CollisionGroup.ThrownItem; From dc979f87c222a84540dc4c02b5fc62d6a19ba7f7 Mon Sep 17 00:00:00 2001 From: DrSmugleaf Date: Wed, 8 Jul 2020 16:43:40 +0200 Subject: [PATCH 2/3] Remove unused using --- .../GameObjects/Components/Projectiles/ThrownItemComponent.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/Content.Server/GameObjects/Components/Projectiles/ThrownItemComponent.cs b/Content.Server/GameObjects/Components/Projectiles/ThrownItemComponent.cs index 53f93e85bb..ee8d2cb53c 100644 --- a/Content.Server/GameObjects/Components/Projectiles/ThrownItemComponent.cs +++ b/Content.Server/GameObjects/Components/Projectiles/ThrownItemComponent.cs @@ -1,6 +1,5 @@ using Content.Server.GameObjects.Components.Projectiles; using Content.Server.GameObjects.EntitySystems.Click; -using Content.Server.Interfaces.GameObjects.Components.Interaction; using Content.Shared.GameObjects; using Content.Shared.Physics; using Robust.Shared.GameObjects; From 1d7928101b9be76413c3884132c47e225d9799de Mon Sep 17 00:00:00 2001 From: DrSmugleaf Date: Wed, 8 Jul 2020 16:44:56 +0200 Subject: [PATCH 3/3] Fix change that was lost in disposals translation --- .../GameObjects/Components/Projectiles/ThrownItemComponent.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Content.Server/GameObjects/Components/Projectiles/ThrownItemComponent.cs b/Content.Server/GameObjects/Components/Projectiles/ThrownItemComponent.cs index ee8d2cb53c..5bc7f4660d 100644 --- a/Content.Server/GameObjects/Components/Projectiles/ThrownItemComponent.cs +++ b/Content.Server/GameObjects/Components/Projectiles/ThrownItemComponent.cs @@ -48,7 +48,7 @@ namespace Content.Server.GameObjects.Components private void StopThrow() { - if (Owner.Deleted) + if (Deleted) { return; }