diff --git a/Docs/Changelog_sm5.txt b/Docs/Changelog_sm5.txt index 112ad2a84e..7e541ca6e0 100644 --- a/Docs/Changelog_sm5.txt +++ b/Docs/Changelog_sm5.txt @@ -16,6 +16,8 @@ StepMania 5.0 alpha 2 | 201203?? is a temporary feature. [AJ] * [GameConstantsAndTypes] Made StageResult Lua-aware. [AJ] * [GameState] Added GetStageResult(pn) Lua binding. [AJ] +* [Player] Keysounds now respect the volume settings. [hanubeki] + Sourced from hanubeki-modified-sm-ssc rev. 16fc5b714582 2012/03/27 ---------- diff --git a/src/Player.cpp b/src/Player.cpp index 9fd39fb75b..920dbcf3ae 100644 --- a/src/Player.cpp +++ b/src/Player.cpp @@ -1437,13 +1437,15 @@ void Player::UpdateHoldNotes( int iSongRow, float fDeltaTime, vector *pVolume = Preference::GetPreferenceByName("SoundVolume"); + float fVol = pVolume->Get(); + if( tn.iKeysoundIndex >= 0 && tn.iKeysoundIndex < (int) m_vKeysounds.size() ) { float factor = (tn.subType == TapNote::hold_head_roll ? 2.0f * fLifeFraction : 10.0f * fLifeFraction - 8.5f); - // todo: Make sure the player's volume settings are respected. -aj - m_vKeysounds[tn.iKeysoundIndex].SetProperty ("Volume", max(0.0f, min(1.0f, factor))); + m_vKeysounds[tn.iKeysoundIndex].SetProperty ("Volume", max(0.0f, min(1.0f, factor)) * fVol); } }