mirror of
https://github.com/WWhiteDreamProject/wwdpublic.git
synced 2026-04-17 13:37:47 +03:00
[Tweak] Crawling (#403)
crawling in my sleep Co-authored-by: vanx <discord@vanxxxx>
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user