feat: Take sound volume into account
This commit is contained in:
parent
93cc5d1f83
commit
7d943047ce
1 changed files with 2 additions and 1 deletions
|
@ -93,7 +93,8 @@ void Sound::update(float dt) {
|
|||
}
|
||||
|
||||
void Sound::playSound(const string &resRef, bool loop) {
|
||||
_sound = AudioPlayer::instance().play(resRef, AudioType::Sound, loop, 1.0f, _blueprint->positional(), getPosition());
|
||||
float gain = _blueprint->volume() / 127.0f;
|
||||
_sound = AudioPlayer::instance().play(resRef, AudioType::Sound, loop, gain, _blueprint->positional(), getPosition());
|
||||
}
|
||||
|
||||
void Sound::play() {
|
||||
|
|
Loading…
Reference in a new issue