@@ -227,7 +227,8 @@ public sealed partial class ShuttleSystem
|
||||
|
||||
component = AddComp<FTLComponent>(uid);
|
||||
component.State = FTLState.Starting;
|
||||
_audio.PlayPvs(_startupSound, uid);
|
||||
// TODO: Need BroadcastGrid to not be bad.
|
||||
SoundSystem.Play(_startupSound.GetSound(), Filter.Empty().AddInRange(Transform(uid).MapPosition, GetSoundRange(uid)), _startupSound.Params);
|
||||
// Make sure the map is setup before we leave to avoid pop-in (e.g. parallax).
|
||||
SetupHyperspace();
|
||||
return true;
|
||||
@@ -283,8 +284,11 @@ public sealed partial class ShuttleSystem
|
||||
var ev = new FTLStartedEvent(uid, target, fromMapUid, fromMatrix, fromRotation);
|
||||
RaiseLocalEvent(uid, ref ev, true);
|
||||
|
||||
comp.TravelStream = _audio.PlayPvs(comp.TravelSound, uid)?.Entity;
|
||||
|
||||
if (comp.TravelSound != null)
|
||||
{
|
||||
comp.TravelStream = SoundSystem.Play(comp.TravelSound.GetSound(),
|
||||
Filter.Pvs(uid, 4f, entityManager: EntityManager), comp.TravelSound.Params);
|
||||
}
|
||||
break;
|
||||
// Arriving, play effects
|
||||
case FTLState.Travelling:
|
||||
@@ -370,8 +374,13 @@ public sealed partial class ShuttleSystem
|
||||
_thruster.DisableLinearThrusters(shuttle);
|
||||
}
|
||||
|
||||
comp.TravelStream = _audio.Stop(comp.TravelStream);
|
||||
_audio.PlayPvs(_arrivalSound, uid);
|
||||
if (comp.TravelStream != null)
|
||||
{
|
||||
comp.TravelStream?.Stop();
|
||||
comp.TravelStream = null;
|
||||
}
|
||||
|
||||
_audio.PlayGlobal(_arrivalSound, Filter.Empty().AddInRange(Transform(uid).MapPosition, GetSoundRange(uid)), true);
|
||||
|
||||
if (TryComp<FTLDestinationComponent>(uid, out var dest))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user