Fix even more warnings (#11968)

Also more instances of someone using TryComp instead of HasComp

Co-authored-by: metalgearsloth <metalgearsloth@gmail.com>
This commit is contained in:
metalgearsloth
2022-10-17 02:49:22 +11:00
committed by GitHub
parent 214d0c1774
commit 1782eb6ad7
22 changed files with 86 additions and 58 deletions

View File

@@ -25,6 +25,7 @@ namespace Content.Shared.Stunnable
[Dependency] private readonly StandingStateSystem _standingStateSystem = default!;
[Dependency] private readonly StatusEffectsSystem _statusEffectSystem = default!;
[Dependency] private readonly MovementSpeedModifierSystem _movementSpeedModifierSystem = default!;
[Dependency] private readonly SharedAudioSystem _audio = default!;
/// <summary>
/// Friction modifier for knocked down players.
@@ -221,9 +222,7 @@ namespace Content.Shared.Stunnable
knocked.HelpTimer = knocked.HelpInterval/2f;
_statusEffectSystem.TryRemoveTime(uid, "KnockedDown", TimeSpan.FromSeconds(knocked.HelpInterval));
SoundSystem.Play(knocked.StunAttemptSound.GetSound(), Filter.Pvs(uid), uid, AudioHelpers.WithVariation(0.05f));
_audio.PlayPredicted(knocked.StunAttemptSound, uid, args.User);
Dirty(knocked);
args.Handled = true;