Wires are now broken in explosions, and drop cables.

Using the wire cutters on a wire drops a cable.
Fix bug where bullets raise an exception when the hit object deletes itself.
This commit is contained in:
Acruid
2019-12-15 19:58:24 -08:00
parent e0cf442041
commit 72cff220cf
3 changed files with 10 additions and 1 deletions

View File

@@ -77,7 +77,7 @@ namespace Content.Server.GameObjects.Components.Projectiles
}
}
if (entity.TryGetComponent(out CameraRecoilComponent recoilComponent)
if (!entity.Deleted && entity.TryGetComponent(out CameraRecoilComponent recoilComponent)
&& Owner.TryGetComponent(out PhysicsComponent physicsComponent))
{
var direction = physicsComponent.LinearVelocity.Normalized;