From e160f9ee62b0390bc41cdfe010e52ef8d1ac4aa7 Mon Sep 17 00:00:00 2001 From: Mat Date: Fri, 27 Mar 2020 21:25:31 +0200 Subject: Louder ambient sound for ghasts --- src/Mobs/Monster.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/Mobs/Monster.cpp') diff --git a/src/Mobs/Monster.cpp b/src/Mobs/Monster.cpp index 233ca70b3..53dc3aba5 100644 --- a/src/Mobs/Monster.cpp +++ b/src/Mobs/Monster.cpp @@ -396,7 +396,14 @@ void cMonster::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk) if (ShouldPlaySound) { auto SoundPitchMultiplier = 1.0f + (Random.RandReal(1.0f) - Random.RandReal(1.0f)) * 0.2f; - m_World->BroadcastSoundEffect(m_SoundAmbient, GetPosition(), 1.0f, SoundPitchMultiplier * 1.0f); + auto SoundVolume = 1.0f; + + if (GetMobType() == mtGhast) { + // Ghasts are loud... + SoundVolume = 10.0f; + } + + m_World->BroadcastSoundEffect(m_SoundAmbient, GetPosition(), SoundVolume, SoundPitchMultiplier * 1.0f); } m_AmbientSoundTimer = 100; } -- cgit v1.2.3