From 3c3b0111dea07eee90e8d31294bdcb0797c14b4d Mon Sep 17 00:00:00 2001 From: Tobias Berger Date: Tue, 18 Feb 2025 18:08:53 +0100 Subject: [PATCH] Fix felinid stepping sounds playing all at once (#3004) * Fix felinid stepping sounds playing all at once Fixes DeltaV-Station/Delta-v#2996 * Short-circuiting && Because why was this not here already --- .../Movement/Systems/SharedMoverController.cs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Content.Shared/Movement/Systems/SharedMoverController.cs b/Content.Shared/Movement/Systems/SharedMoverController.cs index be00f071ef..6f99248767 100644 --- a/Content.Shared/Movement/Systems/SharedMoverController.cs +++ b/Content.Shared/Movement/Systems/SharedMoverController.cs @@ -432,14 +432,6 @@ public abstract partial class SharedMoverController : VirtualController return false; } - // DeltaV - Don't play the sound if they have no shoes and the component - if (NoShoesSilentQuery.HasComp(uid) & - !_inventory.TryGetSlotEntity(uid, "shoes", out var _)) - { - return false; - } - // End DeltaV code - mobMover.LastPosition = coordinates; if (mobMover.StepSoundDistance < distanceNeeded) @@ -447,6 +439,14 @@ public abstract partial class SharedMoverController : VirtualController mobMover.StepSoundDistance -= distanceNeeded; + // DeltaV - Don't play the sound if they have no shoes and the component + if (NoShoesSilentQuery.HasComp(uid) && + !_inventory.TryGetSlotEntity(uid, "shoes", out var _)) + { + return false; + } + // End DeltaV code + if (FootstepModifierQuery.TryComp(uid, out var moverModifier)) { sound = moverModifier.FootstepSoundCollection;