diff --git a/Content.Server/Damage/Systems/DamageOtherOnHitSystem.cs b/Content.Server/Damage/Systems/DamageOtherOnHitSystem.cs index 6e2f0a23ad..b8501cf552 100644 --- a/Content.Server/Damage/Systems/DamageOtherOnHitSystem.cs +++ b/Content.Server/Damage/Systems/DamageOtherOnHitSystem.cs @@ -48,10 +48,10 @@ namespace Content.Server.Damage.Systems _sharedCameraRecoil.KickCamera(args.Target, direction); } + // TODO: If more stuff touches this then handle it after. if (TryComp(uid, out var physics)) { _thrownItem.LandComponent(args.Thrown, args.Component, physics, false); - _physics.ResetDynamics(physics); } } diff --git a/Content.Shared/Throwing/ThrownItemSystem.cs b/Content.Shared/Throwing/ThrownItemSystem.cs index 87378d10cf..c2ec72cfcb 100644 --- a/Content.Shared/Throwing/ThrownItemSystem.cs +++ b/Content.Shared/Throwing/ThrownItemSystem.cs @@ -69,7 +69,7 @@ namespace Content.Shared.Throwing private void HandleCollision(EntityUid uid, ThrownItemComponent component, ref StartCollideEvent args) { - if (args.OtherFixture.Hard == false) + if (!args.OtherFixture.Hard) return; if (args.OtherEntity == component.Thrower) @@ -98,8 +98,13 @@ namespace Content.Shared.Throwing StopThrow(message.Pulled.Owner, thrownItemComponent); } - private void StopThrow(EntityUid uid, ThrownItemComponent thrownItemComponent) + public void StopThrow(EntityUid uid, ThrownItemComponent thrownItemComponent) { + if (TryComp(uid, out var physics)) + { + _physics.SetBodyStatus(physics, BodyStatus.OnGround); + } + if (EntityManager.TryGetComponent(uid, out FixturesComponent? manager)) { var fixture = _fixtures.GetFixtureOrNull(uid, ThrowingFixture, manager: manager); @@ -116,8 +121,6 @@ namespace Content.Shared.Throwing public void LandComponent(EntityUid uid, ThrownItemComponent thrownItem, PhysicsComponent physics, bool playSound) { - _physics.SetBodyStatus(physics, BodyStatus.OnGround); - if (thrownItem.Deleted || Deleted(uid)) return;