Skip to content

Commit

Permalink
Fix double sound for shutters (#23975)
Browse files Browse the repository at this point in the history
Fix double sound

(cherry picked from commit d312d871c8eb97a3a61a41eaad98a1b79a364876)
  • Loading branch information
nikthechampiongr authored and DebugOk committed Jan 26, 2024
1 parent 43de08b commit 1caa663
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions Content.Shared/Prying/Systems/PryingSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -167,10 +167,19 @@ private void OnDoAfter(EntityUid uid, DoorComponent door, DoorPryDoAfterEvent ar
return;
}

// TODO: When we get airlock prediction make this predicted.
// TODO: When we get airlock prediction make this fully predicted.
// When that happens also fix the checking function in the Client AirlockSystem.
if (args.Used != null && comp != null)
_audioSystem.PlayPvs(comp.UseSound, args.Used.Value);
{
if (HasComp<AirlockComponent>(uid))
{
_audioSystem.PlayPvs(comp.UseSound, args.Used.Value);
}
else
{
_audioSystem.PlayPredicted(comp.UseSound, args.Used.Value, args.User);
}
}

var ev = new PriedEvent(args.User);
RaiseLocalEvent(uid, ref ev);
Expand Down

0 comments on commit 1caa663

Please sign in to comment.