Files
wwdpublic/Content.Shared/Movement/Events/GetFootstepSoundEvent.cs
VMSolidus 151e1b60a3 TCJ Makes A Rage Performance PR (#2298)
# Description

I got baited by Ectoplasm, so I then spent 3 hours shaving off a
sizeable chunk of this game's performance cost, including by taking 3 of
the "Top 10 frametime consumers", and reducing their performance costs
by 99% each. Along with various examples of slimming down some of the
worst EQE's.

Oh, and I fixed EmitSoundOnMove being desynced with actual movement. As
part of making EmitSoundOnMove use 99% less CPU time, it was also
synchronized with the MoverController.

# Changelog

🆑
- fix: Fixed items such as tactical webbing, bell collars, and hardsuits
being desynced with character movement.
- tweak: Made various large performance improvements.

(cherry picked from commit 684e8175443167beb0e20e3323a05b5f493b3374)
2025-04-26 11:45:35 +03:00

24 lines
606 B
C#

using Robust.Shared.Audio;
using Content.Shared.Inventory;
namespace Content.Shared.Movement.Events;
/// <summary>
/// Raised directed on an entity when trying to get a relevant footstep sound
/// </summary>
[ByRefEvent]
public record struct GetFootstepSoundEvent(EntityUid User)
{
public readonly EntityUid User = User;
/// <summary>
/// Set the sound to specify a footstep sound and mark as handled.
/// </summary>
public SoundSpecifier? Sound;
}
public record struct MakeFootstepSoundEvent : IInventoryRelayEvent
{
public SlotFlags TargetSlots => SlotFlags.WITHOUT_POCKET;
}