[Tweak] Crawling (#403)

crawling in my sleep

Co-authored-by: vanx <discord@vanxxxx>
This commit is contained in:
vanx
2025-04-03 02:22:31 +03:00
committed by GitHub
parent e3fb817e23
commit 8d7bda9acb

View File

@@ -1,3 +1,5 @@
using Content.Shared.Movement.Components;
using Content.Shared.Movement.Systems;
using Content.Shared.Projectiles;
using Content.Shared.Weapons.Ranged.Components;
using Content.Shared.Standing;
@@ -22,6 +24,12 @@ public sealed class RequireProjectileTargetSystem : EntitySystem
if (!ent.Comp.Active)
return;
// WWDP edit no bullets passing if you move
if (TryComp<InputMoverComponent>(ent, out var mover) && mover.CanMove &&
(mover.HeldMoveButtons & MoveButtons.AnyDirection) != MoveButtons.None)
return;
// WWDP edit end
var other = args.OtherEntity;
if (HasComp<ProjectileComponent>(other) &&
CompOrNull<TargetedProjectileComponent>(other)?.Target != ent)