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
This commit is contained in:
Tobias Berger 2025-02-18 18:08:53 +01:00 committed by GitHub
parent 9078857689
commit 3c3b0111de
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 8 additions and 8 deletions

View File

@ -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;