diff --git a/src/audio/spell_sound_manager.cpp b/src/audio/spell_sound_manager.cpp index 255e83bf..4c024b88 100644 --- a/src/audio/spell_sound_manager.cpp +++ b/src/audio/spell_sound_manager.cpp @@ -2,6 +2,7 @@ #include "audio/audio_engine.hpp" #include "pipeline/asset_manager.hpp" #include "core/logger.hpp" +#include #include namespace wowee { @@ -180,7 +181,7 @@ void SpellSoundManager::playRandomSound(const std::vector& library, } void SpellSoundManager::setVolumeScale(float scale) { - volumeScale_ = std::max(0.0f, std::min(1.0f, scale)); + volumeScale_ = std::clamp(scale, .0f, 1.f); } void SpellSoundManager::playPrecast(MagicSchool school, SpellPower power) {