Fix thrown entity deletion crash
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user