Fixes taser bolts not moving when being shot

This commit is contained in:
Vera Aguilera Puerto
2021-03-19 19:32:22 +01:00
parent 2e65aaf1b2
commit 696fbcd506
3 changed files with 16 additions and 4 deletions

View File

@@ -21,7 +21,7 @@ namespace Content.Server.GameObjects.Components.Items
/// <param name="pushbackRatio">The ratio of impulse applied to the thrower</param>
internal static void TryThrow(this IEntity entity, Vector2 direction, IEntity? user = null, float pushbackRatio = 1.0f)
{
if (direction == Vector2.Zero || !entity.TryGetComponent(out PhysicsComponent? physicsComponent))
if (entity.Deleted || direction == Vector2.Zero || !entity.TryGetComponent(out PhysicsComponent? physicsComponent))
{
return;
}