diff --git a/Content.Server/GameObjects/Components/Projectiles/ProjectileComponent.cs b/Content.Server/GameObjects/Components/Projectiles/ProjectileComponent.cs
index 0b1b6730b4..eb21642190 100644
--- a/Content.Server/GameObjects/Components/Projectiles/ProjectileComponent.cs
+++ b/Content.Server/GameObjects/Components/Projectiles/ProjectileComponent.cs
@@ -1,11 +1,10 @@
-using Robust.Shared.GameObjects;
+using System.Collections.Generic;
+using Robust.Server.GameObjects;
+using Robust.Shared.GameObjects;
using Robust.Shared.Interfaces.GameObjects;
using Robust.Shared.Interfaces.Physics;
using Robust.Shared.Interfaces.GameObjects.Components;
-using System;
-using System.Collections.Generic;
-using YamlDotNet.RepresentationModel;
-using Robust.Shared.Utility;
+using Content.Server.GameObjects.Components.Mobs;
using Content.Shared.GameObjects;
namespace Content.Server.GameObjects.Components.Projectiles
@@ -47,16 +46,25 @@ namespace Content.Server.GameObjects.Components.Projectiles
///
void ICollideBehavior.CollideWith(List collidedwith)
{
- foreach(var entity in collidedwith)
+ foreach (var entity in collidedwith)
{
- if(entity.TryGetComponent(out DamageableComponent damage))
+ if (entity.TryGetComponent(out DamageableComponent damage))
{
damage.TakeDamage(DamageType.Brute, 10);
}
+
+ if (entity.TryGetComponent(out CameraRecoilComponent recoilComponent)
+ && Owner.TryGetComponent(out PhysicsComponent physicsComponent))
+ {
+ var direction = physicsComponent.LinearVelocity.Normalized;
+ recoilComponent.Kick(direction);
+ }
}
if (collidedwith.Count > 0)
+ {
Owner.Delete();
+ }
}
}
}