Refactor all references to AudioSystem functions now that the old ones are obsolete. (#1081)
Co-authored-by: FL-OZ <anotherscuffed@gmail.com>
This commit is contained in:
@@ -203,10 +203,10 @@ namespace Content.Server.GameObjects.Components.Movement
|
||||
|
||||
// Departure
|
||||
// Do we need to rate-limit sounds to stop ear BLAST?
|
||||
soundPlayer.Play(_departureSound, entity.Transform.GridPosition);
|
||||
soundPlayer.PlayAtCoords(_departureSound, entity.Transform.GridPosition);
|
||||
entity.Transform.DetachParent();
|
||||
entity.Transform.GridPosition = position;
|
||||
soundPlayer.Play(_arrivalSound, entity.Transform.GridPosition);
|
||||
soundPlayer.PlayAtCoords(_arrivalSound, entity.Transform.GridPosition);
|
||||
TryChangeState(PortalState.RecentlyTeleported);
|
||||
// To stop spam teleporting. Could potentially look at adding a timer to flush this from the portal
|
||||
immuneEntities.Add(entity);
|
||||
|
||||
@@ -144,7 +144,7 @@ namespace Content.Server.GameObjects.Components.Movement
|
||||
if (_cooldownSound != null)
|
||||
{
|
||||
var soundPlayer = EntitySystem.Get<AudioSystem>();
|
||||
soundPlayer.Play(_cooldownSound, Owner);
|
||||
soundPlayer.PlayFromEntity(_cooldownSound, Owner);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -249,12 +249,12 @@ namespace Content.Server.GameObjects.Components.Movement
|
||||
else
|
||||
{
|
||||
// Departure
|
||||
soundPlayer.Play(_departureSound, user.Transform.GridPosition);
|
||||
soundPlayer.PlayAtCoords(_departureSound, user.Transform.GridPosition);
|
||||
|
||||
// Arrival
|
||||
user.Transform.DetachParent();
|
||||
user.Transform.WorldPosition = vector;
|
||||
soundPlayer.Play(_arrivalSound, user.Transform.GridPosition);
|
||||
soundPlayer.PlayAtCoords(_arrivalSound, user.Transform.GridPosition);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user