diff --git a/src/ScoreKeeperNormal.cpp b/src/ScoreKeeperNormal.cpp index 81f815bcc5..d2cf1b60e3 100644 --- a/src/ScoreKeeperNormal.cpp +++ b/src/ScoreKeeperNormal.cpp @@ -515,8 +515,9 @@ void ScoreKeeperNormal::HandleTapRowScore( const NoteData &nd, int iRow ) { case TNS_W1: case TNS_W2: - m_iCurToastyCombo += iNumTapsInRow; - + // TODO: Come up with a design for the theme to list a set of milestone + // values? Current behavior is to just happen at multiples of + // m_ToastyTrigger. -Kyz /* // compile the list of toasty triggers { @@ -536,21 +537,25 @@ void ScoreKeeperNormal::HandleTapRowScore( const NoteData &nd, int iRow ) m_iNextToastyAt = -1; } */ - - if( m_iCurToastyCombo >= m_ToastyTrigger && - m_iCurToastyCombo - iNumTapsInRow < m_ToastyTrigger && - !GAMESTATE->m_bDemonstrationOrJukebox ) { - SCREENMAN->PostMessageToTopScreen( SM_PlayToasty, 0 ); - Message msg("ToastyAchieved"); - msg.SetParam( "PlayerNumber", m_pPlayerState->m_PlayerNumber ); - msg.SetParam( "ToastyCombo", m_iCurToastyCombo ); - MESSAGEMAN->Broadcast(msg); + int old_toastiness= m_iCurToastyCombo / m_ToastyTrigger; + m_iCurToastyCombo += iNumTapsInRow; + int new_toastiness= m_iCurToastyCombo / m_ToastyTrigger; + if(new_toastiness > old_toastiness && + !GAMESTATE->m_bDemonstrationOrJukebox) + { + SCREENMAN->PostMessageToTopScreen( SM_PlayToasty, 0 ); + Message msg("ToastyAchieved"); + msg.SetParam( "PlayerNumber", m_pPlayerState->m_PlayerNumber ); + msg.SetParam( "ToastyCombo", m_iCurToastyCombo ); + msg.SetParam( "Level", new_toastiness ); + MESSAGEMAN->Broadcast(msg); - // TODO: keep a pointer to the Profile. Don't index with m_PlayerNumber - PROFILEMAN->IncrementToastiesCount( m_pPlayerState->m_PlayerNumber ); + // TODO: keep a pointer to the Profile. Don't index with m_PlayerNumber + PROFILEMAN->IncrementToastiesCount( m_pPlayerState->m_PlayerNumber ); - //m_iCurToastyTrigger++; + //m_iCurToastyTrigger++; + } } break; default: diff --git a/src/ScreenGameplay.cpp b/src/ScreenGameplay.cpp index 7b307f3055..1035ec5f91 100644 --- a/src/ScreenGameplay.cpp +++ b/src/ScreenGameplay.cpp @@ -2874,10 +2874,11 @@ void ScreenGameplay::HandleScreenMessage( const ScreenMessage SM ) } else if( SM == SM_PlayToasty ) { - // todo: make multiple toasties work -aj if( g_bEasterEggs ) - if( !m_Toasty.IsTransitioning() && !m_Toasty.IsFinished() ) // don't play if we've already played it once - m_Toasty.StartTransitioning(); + { + m_Toasty.Reset(); + m_Toasty.StartTransitioning(); + } } else if( ScreenMessageHelpers::ScreenMessageToString(SM).find("0Combo") != string::npos ) {