fix sloppy assert in Player. Oops

This commit is contained in:
Chris Danford
2003-04-11 00:12:07 +00:00
parent 3d0ad7955c
commit 6af055ddef
3 changed files with 11 additions and 16 deletions
+7 -15
View File
@@ -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)
+3
View File
@@ -455,6 +455,9 @@ ScreenEvaluation::ScreenEvaluation( CString sClassName, Type type )
int l;
for( l=0; l<NUM_JUDGE_LINES; l++ )
{
if( l == 0 && !PREFSMAN->m_bMarvelousTiming )
continue; // skip
if( SHOW_JUDGMENT(l) )
{
m_sprJudgeLabels[l].Load( THEME->GetPathTo("Graphics","ScreenEvaluation judge labels 1x8") );
+1 -1
View File
@@ -39,7 +39,7 @@ ScreenSelectDifficultyEX::ScreenSelectDifficultyEX() : ScreenSelect( "ScreenSele
{
m_CurrentPage = PAGE_1;
int p;
for( int p=0; p<NUM_PLAYERS; p++ )
for( p=0; p<NUM_PLAYERS; p++ )
{
m_iChoice[p] = 0;
m_bChosen[p] = false;