summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMat <mail@mathias.is>2020-03-27 20:25:31 +0100
committerGitHub <noreply@github.com>2020-03-27 20:25:31 +0100
commite160f9ee62b0390bc41cdfe010e52ef8d1ac4aa7 (patch)
tree79c0b8c28273801d6d4651f971e39da32b9d10a5
parentReduce ghast spawn rate again (diff)
downloadcuberite-e160f9ee62b0390bc41cdfe010e52ef8d1ac4aa7.tar
cuberite-e160f9ee62b0390bc41cdfe010e52ef8d1ac4aa7.tar.gz
cuberite-e160f9ee62b0390bc41cdfe010e52ef8d1ac4aa7.tar.bz2
cuberite-e160f9ee62b0390bc41cdfe010e52ef8d1ac4aa7.tar.lz
cuberite-e160f9ee62b0390bc41cdfe010e52ef8d1ac4aa7.tar.xz
cuberite-e160f9ee62b0390bc41cdfe010e52ef8d1ac4aa7.tar.zst
cuberite-e160f9ee62b0390bc41cdfe010e52ef8d1ac4aa7.zip
-rw-r--r--src/Mobs/Monster.cpp9
1 files changed, 8 insertions, 1 deletions
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;
}