when clearing lines play voices

This commit is contained in:
2025-12-21 17:26:53 +01:00
parent b46af7ab1d
commit a9943ce8bf

View File

@ -468,6 +468,20 @@ int TetrisApp::Impl::init()
suppressLineVoiceForLevelUp = false; suppressLineVoiceForLevelUp = false;
}); });
// Keep co-op line-clear SFX behavior identical to classic.
coopGame->setSoundCallback([this, playVoiceCue](int linesCleared) {
if (linesCleared <= 0) {
return;
}
SoundEffectManager::instance().playSound("clear_line", 1.0f);
if (!suppressLineVoiceForLevelUp) {
playVoiceCue(linesCleared);
}
suppressLineVoiceForLevelUp = false;
});
game->setLevelUpCallback([this](int /*newLevel*/) { game->setLevelUpCallback([this](int /*newLevel*/) {
if (skipNextLevelUpJingle) { if (skipNextLevelUpJingle) {
skipNextLevelUpJingle = false; skipNextLevelUpJingle = false;