Skip to content

Commit

Permalink
fix felinids footsteps (#1866)
Browse files Browse the repository at this point in the history
* I am SO fucking smart

* fixed random shit from my doing of random shit
  • Loading branch information
MilonPL authored Sep 20, 2024
1 parent c2012fb commit 3a01744
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions Content.Shared/Movement/Systems/SharedMoverController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
using Content.Shared.Mobs.Systems;
using Content.Shared.Movement.Components;
using Content.Shared.Movement.Events;
using Content.Shared.StepTrigger.Components; // DeltaV - NoShoesSilentFootstepsComponent
using Content.Shared.Tag;
using Robust.Shared.Audio;
using Robust.Shared.Audio.Systems;
Expand Down Expand Up @@ -59,6 +60,7 @@ public abstract partial class SharedMoverController : VirtualController
protected EntityQuery<NoRotateOnMoveComponent> NoRotateQuery;
protected EntityQuery<FootstepModifierComponent> FootstepModifierQuery;
protected EntityQuery<MapGridComponent> MapGridQuery;
protected EntityQuery<NoShoesSilentFootstepsComponent> NoShoesSilentQuery; // DeltaV - NoShoesSilentFootstepsComponent

/// <summary>
/// <see cref="CCVars.StopSpeed"/>
Expand Down Expand Up @@ -88,6 +90,7 @@ public override void Initialize()
CanMoveInAirQuery = GetEntityQuery<CanMoveInAirComponent>();
FootstepModifierQuery = GetEntityQuery<FootstepModifierComponent>();
MapGridQuery = GetEntityQuery<MapGridComponent>();
NoShoesSilentQuery = GetEntityQuery<NoShoesSilentFootstepsComponent>(); // DeltaV - NoShoesSilentFootstepsComponent

InitializeInput();
InitializeRelay();
Expand Down Expand Up @@ -429,6 +432,14 @@ private bool TryGetSound(
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)
Expand Down

0 comments on commit 3a01744

Please sign in to comment.