2022-04-14 12:45:56 +01:00

21 lines
609 B
C#

using QSB.EchoesOfTheEye.Ghosts.WorldObjects;
using QSB.Messaging;
namespace QSB.EchoesOfTheEye.Ghosts.Messages;
internal class PlayVoiceAudioMessage : QSBWorldObjectMessage<QSBGhostEffects, (AudioType audioType, float volumeScale, bool near)>
{
public PlayVoiceAudioMessage(AudioType audioType, float volumeScale, bool near) : base((audioType, volumeScale, near)) { }
public override void OnReceiveRemote()
{
if (Data.near)
{
WorldObject.PlayVoiceAudioNear(Data.audioType, Data.volumeScale, true);
return;
}
WorldObject.PlayVoiceAudioFar(Data.audioType, Data.volumeScale, true);
}
}