From 6af055ddef5635108315165c47a1610550f727c5 Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Fri, 11 Apr 2003 00:12:07 +0000 Subject: [PATCH] fix sloppy assert in Player. Oops --- stepmania/src/Player.cpp | 22 +++++++--------------- stepmania/src/ScreenEvaluation.cpp | 3 +++ stepmania/src/ScreenSelectDifficultyEX.cpp | 2 +- 3 files changed, 11 insertions(+), 16 deletions(-) diff --git a/stepmania/src/Player.cpp b/stepmania/src/Player.cpp index dcab4cc10a..01dd63eafd 100644 --- a/stepmania/src/Player.cpp +++ b/stepmania/src/Player.cpp @@ -345,8 +345,6 @@ void Player::Step( int col ) //LOG->Trace( "iIndexStartLookingAt = %d, iNumElementsToExamine = %d", iIndexStartLookingAt, iNumElementsToExamine ); - bool bDestroyedNote = false; - if( iIndexOverlappingNote != -1 ) { // compute the score for this hit @@ -369,12 +367,7 @@ void Player::Step( int col ) else if( fSecondsFromPerfect <= PREFSMAN->m_fJudgeWindowGreatSeconds ) score = TNS_GREAT; else if( fSecondsFromPerfect <= PREFSMAN->m_fJudgeWindowGoodSeconds ) score = TNS_GOOD; else if( fSecondsFromPerfect <= PREFSMAN->m_fJudgeWindowBooSeconds ) score = TNS_BOO; - else - { - // if this step is worse than Boo, we shouldn't be here in the first place. - ASSERT(0); - return; - } + else score = TNS_NONE; } else { @@ -391,24 +384,23 @@ void Player::Step( int col ) if( score==TNS_MARVELOUS && !PREFSMAN->m_bMarvelousTiming ) score = TNS_PERFECT; - bDestroyedNote = (score >= TNS_GOOD); + if( score >= TNS_GOOD ) + m_GrayArrowRow.Step( col ); LOG->Trace("Note offset: %f (fSecondsFromPerfect = %f), Score: %i", fNoteOffset, fSecondsFromPerfect, score); + SetTapNoteScore(col, iIndexOverlappingNote, score); - SetTapNoteOffset(col, iIndexOverlappingNote, -fNoteOffset); + + if( score != TNS_NONE ) + SetTapNoteOffset(col, iIndexOverlappingNote, -fNoteOffset); if( GAMESTATE->m_PlayerController[m_PlayerNumber] == HUMAN && score >= TNS_GREAT ) HandleAutosync(fNoteOffset); - ASSERT( score != TNS_NONE ); - if( IsRowCompletelyJudged(iIndexOverlappingNote) ) OnRowCompletelyJudged( iIndexOverlappingNote ); } - - if( !bDestroyedNote ) - m_GrayArrowRow.Step( col ); } void Player::HandleAutosync(float fNoteOffset) diff --git a/stepmania/src/ScreenEvaluation.cpp b/stepmania/src/ScreenEvaluation.cpp index 19305faf5f..3b7eacaaa5 100644 --- a/stepmania/src/ScreenEvaluation.cpp +++ b/stepmania/src/ScreenEvaluation.cpp @@ -455,6 +455,9 @@ ScreenEvaluation::ScreenEvaluation( CString sClassName, Type type ) int l; for( l=0; lm_bMarvelousTiming ) + continue; // skip + if( SHOW_JUDGMENT(l) ) { m_sprJudgeLabels[l].Load( THEME->GetPathTo("Graphics","ScreenEvaluation judge labels 1x8") ); diff --git a/stepmania/src/ScreenSelectDifficultyEX.cpp b/stepmania/src/ScreenSelectDifficultyEX.cpp index 485b88eb75..7d7172e838 100644 --- a/stepmania/src/ScreenSelectDifficultyEX.cpp +++ b/stepmania/src/ScreenSelectDifficultyEX.cpp @@ -39,7 +39,7 @@ ScreenSelectDifficultyEX::ScreenSelectDifficultyEX() : ScreenSelect( "ScreenSele { m_CurrentPage = PAGE_1; int p; - for( int p=0; p