mirror of
https://github.com/space-wizards/space-station-14.git
synced 2026-02-14 19:29:53 +01:00
Fix sound issues with arti crusher. (#42406)
AAAAAAAAAAAAAAAAAAAAA Co-authored-by: Princess Cheeseballs <66055347+Pronana@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
e4ce0a7fbe
commit
a35a48c351
@@ -121,7 +121,7 @@ public abstract class SharedArtifactCrusherSystem : EntitySystem
|
||||
crusher.Crushing = true;
|
||||
crusher.NextSecond = _timing.CurTime + TimeSpan.FromSeconds(1);
|
||||
crusher.CrushEndTime = _timing.CurTime + crusher.CrushDuration;
|
||||
crusher.CrushingSoundEntity = AudioSystem.PlayPvs(crusher.CrushingSound, ent)?.Entity;
|
||||
crusher.CrushingSoundEntity = AudioSystem.PlayPredicted(crusher.CrushingSound, ent, user)?.Entity ?? crusher.CrushingSoundEntity;
|
||||
_appearance.SetData(ent, ArtifactCrusherVisuals.Crushing, true);
|
||||
Dirty(ent, ent.Comp1);
|
||||
}
|
||||
@@ -135,10 +135,7 @@ public abstract class SharedArtifactCrusherSystem : EntitySystem
|
||||
_appearance.SetData(ent, ArtifactCrusherVisuals.Crushing, false);
|
||||
|
||||
if (early)
|
||||
{
|
||||
AudioSystem.Stop(ent.Comp.CrushingSoundEntity);
|
||||
ent.Comp.CrushingSoundEntity = null;
|
||||
}
|
||||
ent.Comp.CrushingSoundEntity = AudioSystem.Stop(ent.Comp.CrushingSoundEntity);
|
||||
|
||||
Dirty(ent, ent.Comp);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user