diff --git a/stepmania/src/Inventory.cpp b/stepmania/src/Inventory.cpp index b2c732eb5d..379014a8db 100644 --- a/stepmania/src/Inventory.cpp +++ b/stepmania/src/Inventory.cpp @@ -110,8 +110,9 @@ void Inventory::Update( float fDelta ) if( iLastSecond != iThisSecond ) { int iSlotToConsider = rand()%NUM_INVENTORY_SLOTS; + bool bTimeToUse = (rand()%10)==0; if( GAMESTATE->m_sInventory[m_PlayerNumber][iSlotToConsider] != "" && - rand()%5 == 0 ) + bTimeToUse ) { UseItem( iSlotToConsider ); } diff --git a/stepmania/src/MusicWheel.cpp b/stepmania/src/MusicWheel.cpp index bee10d9cc6..f8516fea30 100644 --- a/stepmania/src/MusicWheel.cpp +++ b/stepmania/src/MusicWheel.cpp @@ -135,7 +135,7 @@ MusicWheel::MusicWheel() GAMESTATE->m_pCurSong = pSong; for( int p=0; pIsPlayerEnabled(p) ) + if( GAMESTATE->IsHumanPlayer(p) ) { GAMESTATE->m_pCurNotes[p] = pNotes; GAMESTATE->m_PlayerOptions[p] = po; diff --git a/stepmania/src/NoteDataWithScoring.cpp b/stepmania/src/NoteDataWithScoring.cpp index 24e07e56db..7da57085fe 100644 --- a/stepmania/src/NoteDataWithScoring.cpp +++ b/stepmania/src/NoteDataWithScoring.cpp @@ -102,14 +102,20 @@ TapNoteScore NoteDataWithScoring::MinTapNoteScore(unsigned row) const TapNoteScore score = TNS_MARVELOUS; for( int t=0; t= TNS_MISS; +} + /* Return the last tap score of a row: the grade of the tap that completed * the row. If the row has no tap notes, return -1. If any tap notes aren't * graded (any tap is TNS_NONE) or are missed (TNS_MISS), return it. */ diff --git a/stepmania/src/NoteDataWithScoring.h b/stepmania/src/NoteDataWithScoring.h index 598c3896be..a9611ccc02 100644 --- a/stepmania/src/NoteDataWithScoring.h +++ b/stepmania/src/NoteDataWithScoring.h @@ -49,6 +49,7 @@ public: float GetHoldNoteLife(unsigned h) const; void SetHoldNoteLife(unsigned h, float f); + bool IsRowCompletelyJudged(unsigned row) const; TapNoteScore MinTapNoteScore(unsigned row) const; int LastTapNoteScoreTrack(unsigned row) const; TapNoteScore LastTapNoteScore(unsigned row) const; diff --git a/stepmania/src/Player.cpp b/stepmania/src/Player.cpp index 4c68186957..2f798d17ac 100644 --- a/stepmania/src/Player.cpp +++ b/stepmania/src/Player.cpp @@ -10,9 +10,9 @@ ----------------------------------------------------------------------------- */ +#include "Player.h" #include "GameConstantsAndTypes.h" #include // for fabs() -#include "Player.h" #include "RageUtil.h" #include "PrefsManager.h" #include "GameConstantsAndTypes.h" @@ -195,21 +195,19 @@ void Player::Update( float fDeltaTime ) if( hn.fStartBeat < fSongBeat && fSongBeat < hn.fEndBeat ) // if the song beat is in the range of this hold { bool bIsHoldingButton = INPUTMAPPER->IsButtonDown( GameI ); - if( GAMESTATE->m_PlayerController[m_PlayerNumber] != HUMAN ) // TODO: Make the CPU miss sometimes. + + // TODO: Make the CPU miss sometimes. + if( GAMESTATE->m_PlayerController[m_PlayerNumber] != HUMAN ) bIsHoldingButton = true; m_NoteField.m_bIsHoldingHoldNote[i] = bIsHoldingButton && bSteppedOnTapNote; // set host flag so NoteField can do intelligent drawing if( bSteppedOnTapNote ) // this note is not judged and we stepped on its head - { m_NoteField.GetHoldNote(i).fStartBeat = fSongBeat; // move the start of this Hold - } if( bSteppedOnTapNote && bIsHoldingButton ) { // Increase life -// fLife += fDeltaTime/PREFSMAN->m_fJudgeWindowOKSeconds; -// fLife = min( fLife, 1 ); // clamp fLife = 1; m_GhostArrowRow.HoldNote( hn.iTrack ); // update the "electric ghost" effect @@ -240,7 +238,7 @@ void Player::Update( float fDeltaTime ) if( hns != HNS_NONE ) { - /* this note's been judged */ + /* this note has been judged */ HandleHoldScore( hns, tns ); m_HoldJudgment[hn.iTrack].SetHoldJudgment( hns ); } @@ -371,11 +369,23 @@ 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 score = TNS_NONE; + else + { + // if this step is worse than Boo, we shouldn't be here in the first place. + ASSERT(0); + return; + } } else { score = PlayerAI::GetTapNoteScore( GAMESTATE->m_PlayerController[m_PlayerNumber], GAMESTATE->GetSumOfActiveAttackLevels(m_PlayerNumber) ); + + /* AI will generate misses here. Don't handle a miss like a regular note because + * we want the judgment animation to appear delayed. Instead, return early if + * AI generated a miss, and let UpdateMissedTapNotesOlderThan() detect and handle the + * misses. */ + if( score == TNS_MISS ) + return; } if( score==TNS_MARVELOUS && !PREFSMAN->m_bMarvelousTiming ) @@ -387,11 +397,14 @@ void Player::Step( int col ) SetTapNoteScore(col, iIndexOverlappingNote, score); SetTapNoteOffset(col, iIndexOverlappingNote, -fNoteOffset); - if ( score >= TNS_GREAT ) + if( GAMESTATE->m_PlayerController[m_PlayerNumber] == HUMAN && + score >= TNS_GREAT ) HandleAutosync(fNoteOffset); - if (score > TNS_NONE && MinTapNoteScore(iIndexOverlappingNote) >= TNS_BOO ) - OnRowDestroyed( iIndexOverlappingNote ); + ASSERT( score != TNS_NONE ); + + if( IsRowCompletelyJudged(iIndexOverlappingNote) ) + OnRowCompletelyJudged( iIndexOverlappingNote ); } if( !bDestroyedNote ) @@ -420,9 +433,9 @@ void Player::HandleAutosync(float fNoteOffset) } -void Player::OnRowDestroyed( int iIndexThatWasSteppedOn ) +void Player::OnRowCompletelyJudged( int iIndexThatWasSteppedOn ) { - LOG->Trace( "Player::OnRowDestroyed" ); + LOG->Trace( "Player::OnRowCompletelyJudged" ); /* Find the minimum score of the row. This will never be TNS_NONE, since this * function is only called when a row is completed. */ @@ -515,14 +528,9 @@ void Player::CrossedRow( int iNoteRow ) { // check to see if there's at the crossed row for( int t=0; tm_PlayerController[m_PlayerNumber], GAMESTATE->GetSumOfActiveAttackLevels(m_PlayerNumber) ); - if( tns!=TNS_MISS ) - this->Step( t ); - } - } + if( GAMESTATE->m_PlayerController[m_PlayerNumber] != HUMAN ) + Step( t ); } @@ -572,8 +580,6 @@ void Player::HandleHoldScore( HoldNoteScore holdScore, TapNoteScore tapScore ) if( m_pLifeMeter ) { m_pLifeMeter->ChangeLife( holdScore, tapScore ); - - // refresh Oni life meter m_pLifeMeter->OnDancePointsChange(); } } diff --git a/stepmania/src/Player.h b/stepmania/src/Player.h index 78409213d1..106c80b50e 100644 --- a/stepmania/src/Player.h +++ b/stepmania/src/Player.h @@ -54,7 +54,7 @@ public: protected: void UpdateTapNotesMissedOlderThan( float fMissIfOlderThanThisBeat ); - void OnRowDestroyed( int iStepIndex ); + void OnRowCompletelyJudged( int iStepIndex ); void HandleTapRowScore( unsigned row ); void HandleHoldScore( HoldNoteScore holdScore, TapNoteScore tapScore ); void HandleAutosync(float fNoteOffset); diff --git a/stepmania/src/PlayerAI.cpp b/stepmania/src/PlayerAI.cpp index 441b4854f2..57519da2e2 100644 --- a/stepmania/src/PlayerAI.cpp +++ b/stepmania/src/PlayerAI.cpp @@ -23,7 +23,7 @@ struct TapScoreDistribution float fRand = randomf(0,1); ASSERT( iDifficultyExponent >= 1 ); fRand = powf(fRand, iDifficultyExponent); - for( int i=0; iIsPlayerEnabled(MenuI.player) ) + if( !GAMESTATE->IsHumanPlayer(MenuI.player) ) return; switch( MenuI.button ) diff --git a/stepmania/src/ScreenEdit.cpp b/stepmania/src/ScreenEdit.cpp index 98f360c061..0b67590bd0 100644 --- a/stepmania/src/ScreenEdit.cpp +++ b/stepmania/src/ScreenEdit.cpp @@ -29,6 +29,7 @@ #include "NoteSkinManager.h" #include "Notes.h" #include +#include "NoteFieldPositioning.h" const float RECORD_HOLD_SECONDS = 0.3f; @@ -271,6 +272,8 @@ ScreenEdit::ScreenEdit() GAMESTATE->m_PlayerController[PLAYER_1] = HUMAN; m_Player.SetXY( PLAYER_X, PLAYER_Y ); + GAMESTATE->m_Position[PLAYER_1]->LoadFromStyleDef(GAMESTATE->GetCurrentStyleDef(), PLAYER_1); + m_Fade.SetClosed(); m_sprHelp.Load( THEME->GetPathTo("Graphics","ScreenEdit help") ); diff --git a/stepmania/src/ScreenEvaluation.cpp b/stepmania/src/ScreenEvaluation.cpp index e1142d9902..19305faf5f 100644 --- a/stepmania/src/ScreenEvaluation.cpp +++ b/stepmania/src/ScreenEvaluation.cpp @@ -189,16 +189,16 @@ ScreenEvaluation::ScreenEvaluation( CString sClassName, Type type ) case stage: { for( int p=0; pIsPlayerEnabled(p) ) + if( GAMESTATE->IsHumanPlayer(p) ) GAMESTATE->m_pCurNotes[p]->AddScore( (PlayerNumber)p, grade[p], stageStats.fScore[p], bNewRecord[p] ); } break; case summary: { NotesType nt = GAMESTATE->GetCurrentStyleDef()->m_NotesType; - bool bIsPlayerEnabled[NUM_PLAYERS]; + bool bIsHumanPlayer[NUM_PLAYERS]; for( p=0; pIsPlayerEnabled(p); + bIsHumanPlayer[p] = GAMESTATE->IsHumanPlayer(p); RankingCategory cat[NUM_PLAYERS]; int iRankingIndex[NUM_PLAYERS]; @@ -208,7 +208,7 @@ ScreenEvaluation::ScreenEvaluation( CString sClassName, Type type ) cat[p] = AverageMeterToRankingCategory( fAverageMeter ); } - SONGMAN->AddScores( nt, bIsPlayerEnabled, cat, stageStats.fScore, iRankingIndex ); + SONGMAN->AddScores( nt, bIsHumanPlayer, cat, stageStats.fScore, iRankingIndex ); COPY( GAMESTATE->m_RankingCategory, cat ); COPY( GAMESTATE->m_iRankingIndex, iRankingIndex ); @@ -218,14 +218,14 @@ ScreenEvaluation::ScreenEvaluation( CString sClassName, Type type ) case course: { NotesType nt = GAMESTATE->GetCurrentStyleDef()->m_NotesType; - bool bIsPlayerEnabled[NUM_PLAYERS]; + bool bIsHumanPlayer[NUM_PLAYERS]; for( p=0; pIsPlayerEnabled(p); + bIsHumanPlayer[p] = GAMESTATE->IsHumanPlayer(p); int iRankingIndex[NUM_PLAYERS]; Course* pCourse = GAMESTATE->m_pCurCourse; - pCourse->AddScores( nt, bIsPlayerEnabled, stageStats.iActualDancePoints, stageStats.fAliveSeconds, iRankingIndex, bNewRecord ); + pCourse->AddScores( nt, bIsHumanPlayer, stageStats.iActualDancePoints, stageStats.fAliveSeconds, iRankingIndex, bNewRecord ); COPY( GAMESTATE->m_iRankingIndex, iRankingIndex ); GAMESTATE->m_pRankingCourse = pCourse; GAMESTATE->m_RankingNotesType = nt; @@ -483,7 +483,7 @@ ScreenEvaluation::ScreenEvaluation( CString sClassName, Type type ) case 3: iValue = stageStats.iTapNoteScores[p][TNS_GOOD]; break; case 4: iValue = stageStats.iTapNoteScores[p][TNS_BOO]; break; case 5: iValue = stageStats.iTapNoteScores[p][TNS_MISS]; break; - case 6: iValue = stageStats.iTapNoteScores[p][HNS_OK]; break; + case 6: iValue = stageStats.iHoldNoteScores[p][HNS_OK]; break; case 7: iValue = stageStats.iMaxCombo[p]; break; default: iValue = 0; ASSERT(0); } @@ -829,7 +829,7 @@ void ScreenEvaluation::MenuStart( PlayerNumber pn ) { bool bOnePassed = false; for( int p=0; pIsPlayerEnabled(p) ) + if( GAMESTATE->IsHumanPlayer(p) ) bOnePassed |= !GAMESTATE->m_CurStageStats.bFailed[p]; if( bOnePassed ) diff --git a/stepmania/src/ScreenEz2SelectMusic.cpp b/stepmania/src/ScreenEz2SelectMusic.cpp index f1500880c3..e227885ad6 100644 --- a/stepmania/src/ScreenEz2SelectMusic.cpp +++ b/stepmania/src/ScreenEz2SelectMusic.cpp @@ -379,7 +379,7 @@ void ScreenEz2SelectMusic::DrawPrimitives() void ScreenEz2SelectMusic::EasierDifficulty( PlayerNumber pn ) { - if( !GAMESTATE->IsPlayerEnabled(pn) ) + if( !GAMESTATE->IsHumanPlayer(pn) ) return; if( m_arrayNotes[pn].empty() ) return; @@ -406,7 +406,7 @@ void ScreenEz2SelectMusic::EasierDifficulty( PlayerNumber pn ) void ScreenEz2SelectMusic::HarderDifficulty( PlayerNumber pn ) { - if( !GAMESTATE->IsPlayerEnabled(pn + if( !GAMESTATE->IsHumanPlayer(pn ) ) return; if( m_arrayNotes[pn].empty() ) @@ -464,7 +464,7 @@ void ScreenEz2SelectMusic::MusicChanged() for( pn=0; pnIsPlayerEnabled( PlayerNumber(pn) ) ) + if( !GAMESTATE->IsHumanPlayer( PlayerNumber(pn) ) ) continue; for( unsigned i=0; im_fSongBeat ); if( iRowNow >= 0 ) { - for( int r=m_iRowLastCrossed+1; r<=iRowNow; r++ ) // for each index we crossed since the last update - { + for( ; m_iRowLastCrossed <= iRowNow; m_iRowLastCrossed++ ) // for each index we crossed since the last update for( pn=0; pnIsPlayerEnabled(pn) ) - m_Player[pn].CrossedRow( r ); - } - } - - m_iRowLastCrossed = iRowNow; + m_Player[pn].CrossedRow( m_iRowLastCrossed ); } if( GAMESTATE->m_SongOptions.m_bAssistTick && IsTimeToPlayTicks()) diff --git a/stepmania/src/ScreenInstructions.cpp b/stepmania/src/ScreenInstructions.cpp index 1539fb98cc..db626542ee 100644 --- a/stepmania/src/ScreenInstructions.cpp +++ b/stepmania/src/ScreenInstructions.cpp @@ -47,7 +47,7 @@ ScreenInstructions::ScreenInstructions() Difficulty easiestDifficulty = (Difficulty)(NUM_DIFFICULTIES-1); for( int p=0; pIsPlayerEnabled(p) ) + if( !GAMESTATE->IsHumanPlayer(p) ) continue; easiestDifficulty = min( easiestDifficulty, GAMESTATE->m_PreferredDifficulty[p] ); } diff --git a/stepmania/src/ScreenNameEntry.cpp b/stepmania/src/ScreenNameEntry.cpp index f72bf5920a..d2cdf43eea 100644 --- a/stepmania/src/ScreenNameEntry.cpp +++ b/stepmania/src/ScreenNameEntry.cpp @@ -144,7 +144,7 @@ ScreenNameEntry::ScreenNameEntry() // remove modifiers that may have been on the last song GAMESTATE->m_PlayerOptions[p] = PlayerOptions(); - ASSERT( GAMESTATE->IsPlayerEnabled(p) ); // they better be enabled if they made a high score! + ASSERT( GAMESTATE->IsHumanPlayer(p) ); // they better be enabled if they made a high score! m_GrayArrowRow[p].Load( (PlayerNumber)p ); m_GrayArrowRow[p].SetX( (float)GAMESTATE->GetCurrentStyleDef()->m_iCenterX[p] ); @@ -363,7 +363,7 @@ void ScreenNameEntry::HandleScreenMessage( const ScreenMessage SM ) StageStats stats; GAMESTATE->GetFinalEvalStatsAndSongs( stats, vSongs ); for( int p=0; pIsPlayerEnabled(p) ) + if( GAMESTATE->IsHumanPlayer(p) ) max_grade = max( max_grade, stats.GetGrade((PlayerNumber)p) ); if( max_grade >= GRADE_AA ) SCREENMAN->SetNewScreen( "ScreenCredits" ); diff --git a/stepmania/src/ScreenOptions.cpp b/stepmania/src/ScreenOptions.cpp index cc30b1bca1..35ac33f53a 100644 --- a/stepmania/src/ScreenOptions.cpp +++ b/stepmania/src/ScreenOptions.cpp @@ -100,7 +100,7 @@ void ScreenOptions::Init( InputMode im, OptionRow OptionRow[], int iNumOptionLin // init highlights and underlines for( int p=0; pIsPlayerEnabled(p) ) + if( !GAMESTATE->IsHumanPlayer(p) ) continue; // skip for( int l=0; lIsPlayerEnabled(p) ) + if( GAMESTATE->IsHumanPlayer(p) ) { BitmapText &option = m_textItems[i][p]; @@ -386,7 +386,7 @@ void ScreenOptions::UpdateEnabledDisabled() { bool bThisRowIsSelected = false; for( int p=0; pIsPlayerEnabled(p) && m_iCurrentRow[p] == i ) + if( GAMESTATE->IsHumanPlayer(p) && m_iCurrentRow[p] == i ) bThisRowIsSelected = true; m_sprBullets[i].SetDiffuse( bThisRowIsSelected ? colorSelected : colorNotSelected ); @@ -403,7 +403,7 @@ void ScreenOptions::UpdateEnabledDisabled() bool bThisRowIsSelectedByBoth = true; for( int p=0; pIsPlayerEnabled(p) && m_iCurrentRow[p] != i ) + if( GAMESTATE->IsHumanPlayer(p) && m_iCurrentRow[p] != i ) bThisRowIsSelectedByBoth = false; m_textItems[i][0].SetDiffuse( bThisRowIsSelectedByBoth ? colorNotSelected : colorSelected ); if( bThisRowIsSelectedByBoth ) @@ -511,7 +511,7 @@ void ScreenOptions::MenuStart( PlayerNumber pn ) { bool bAllOnExit = true; for( int p=0; pIsPlayerEnabled(p) && m_iCurrentRow[p] != m_iNumOptionRows ) + if( GAMESTATE->IsHumanPlayer(p) && m_iCurrentRow[p] != m_iNumOptionRows ) bAllOnExit = false; if( m_iCurrentRow[pn] != m_iNumOptionRows ) // not on exit diff --git a/stepmania/src/ScreenPrompt.cpp b/stepmania/src/ScreenPrompt.cpp index 5fcf3cb59b..5c54adb4f4 100644 --- a/stepmania/src/ScreenPrompt.cpp +++ b/stepmania/src/ScreenPrompt.cpp @@ -51,8 +51,8 @@ ScreenPrompt::ScreenPrompt( ScreenMessage SM_SendWhenDone, CString sText, bool b m_rectAnswerBox.SetDiffuse( RageColor(0.5f,0.5f,1.0f,0.7f) ); this->AddChild( &m_rectAnswerBox ); - m_textAnswer[0].LoadFromFont( THEME->GetPathTo("Fonts","header1") ); - m_textAnswer[1].LoadFromFont( THEME->GetPathTo("Fonts","header1") ); + m_textAnswer[0].LoadFromFont( THEME->GetPathTo("Fonts","_shared1") ); + m_textAnswer[1].LoadFromFont( THEME->GetPathTo("Fonts","_shared1") ); m_textAnswer[0].SetY( PROMPT_Y ); m_textAnswer[1].SetY( PROMPT_Y ); this->AddChild( &m_textAnswer[0] ); diff --git a/stepmania/src/ScreenSelect.cpp b/stepmania/src/ScreenSelect.cpp index 354937852a..996cf891dd 100644 --- a/stepmania/src/ScreenSelect.cpp +++ b/stepmania/src/ScreenSelect.cpp @@ -232,7 +232,7 @@ void ScreenSelect::HandleScreenMessage( const ScreenMessage SM ) case SM_MenuTimer: { for( int p=0; pIsPlayerEnabled(p) ) + if( GAMESTATE->IsHumanPlayer(p) ) MenuStart( (PlayerNumber)p ); } break; diff --git a/stepmania/src/ScreenSelectCourse.cpp b/stepmania/src/ScreenSelectCourse.cpp index 628ecc5aa2..85e0876b99 100644 --- a/stepmania/src/ScreenSelectCourse.cpp +++ b/stepmania/src/ScreenSelectCourse.cpp @@ -101,7 +101,7 @@ ScreenSelectCourse::ScreenSelectCourse() for( int p=0; pIsPlayerEnabled((PlayerNumber)p) ) + if( !GAMESTATE->IsHumanPlayer((PlayerNumber)p) ) continue; // skip m_sprHighScoreFrame[p].Load( THEME->GetPathTo("Graphics","ScreenSelectCourse score frame") ); @@ -211,7 +211,7 @@ void ScreenSelectCourse::Input( const DeviceInput& DeviceI, InputEventType type, if( MenuI.button == MENU_BUTTON_RIGHT || MenuI.button == MENU_BUTTON_LEFT ) { if( !MenuI.IsValid() ) return; - if( !GAMESTATE->IsPlayerEnabled(MenuI.player) ) return; + if( !GAMESTATE->IsHumanPlayer(MenuI.player) ) return; int dir = 0; if(INPUTMAPPER->IsButtonDown( MenuInput(MenuI.player, MENU_BUTTON_RIGHT) ) ) @@ -432,7 +432,7 @@ void ScreenSelectCourse::UpdateOptionsDisplays() { for( int p=0; pIsPlayerEnabled(p) ) + if( GAMESTATE->IsHumanPlayer(p) ) { CString s = GAMESTATE->m_PlayerOptions[p].GetString(); s.Replace( ", ", "\n" ); diff --git a/stepmania/src/ScreenSelectDifficulty.cpp b/stepmania/src/ScreenSelectDifficulty.cpp index 226d32c89d..6a3e0b7abe 100644 --- a/stepmania/src/ScreenSelectDifficulty.cpp +++ b/stepmania/src/ScreenSelectDifficulty.cpp @@ -183,7 +183,7 @@ void ScreenSelectDifficulty::UpdateSelectableChoices() } for( int p=0; pIsPlayerEnabled(p) ) + if( GAMESTATE->IsHumanPlayer(p) ) { MenuRight( (PlayerNumber)p ); MenuLeft( (PlayerNumber)p ); @@ -227,7 +227,7 @@ void ScreenSelectDifficulty::ChangePage( Page newPage ) // If anyone has already chosen, don't allow changing of pages for( p=0; pIsPlayerEnabled(p) && m_bChosen[p] ) + if( GAMESTATE->IsHumanPlayer(p) && m_bChosen[p] ) return; bool bPageIncreasing = newPage > m_CurrentPage; @@ -257,7 +257,7 @@ void ScreenSelectDifficulty::ChangeWithinPage( PlayerNumber pn, int iNewChoice, { for( int p=0; pIsPlayerEnabled(p) ) + if( !GAMESTATE->IsHumanPlayer(p) ) continue; // skip if( p!=pn && m_CurrentPage==PAGE_1 ) @@ -333,7 +333,7 @@ void ScreenSelectDifficulty::MenuStart( PlayerNumber pn ) // check to see if everyone has chosen for( p=0; pIsPlayerEnabled((PlayerNumber)p) && m_bChosen[p] == false ) + if( GAMESTATE->IsHumanPlayer((PlayerNumber)p) && m_bChosen[p] == false ) return; } this->PostScreenMessage( SM_BeginFadingOut, SLEEP_AFTER_CHOICE_SECONDS ); // tell our owner it's time to move on @@ -357,7 +357,7 @@ void ScreenSelectDifficulty::TweenOnScreen() for( p=0; pIsPlayerEnabled((PlayerNumber)p) ) + if( !GAMESTATE->IsHumanPlayer((PlayerNumber)p) ) continue; float fCursorX = GetCursorX( (PlayerNumber)p ); @@ -380,7 +380,7 @@ void ScreenSelectDifficulty::TweenOffScreen() for( int p=0; pIsPlayerEnabled((PlayerNumber)p) ) + if( !GAMESTATE->IsHumanPlayer((PlayerNumber)p) ) continue; m_sprCursor[p].Command( CURSOR_OFF_COMMAND ); diff --git a/stepmania/src/StageStats.cpp b/stepmania/src/StageStats.cpp index c1dd37e779..51717839f4 100644 --- a/stepmania/src/StageStats.cpp +++ b/stepmania/src/StageStats.cpp @@ -81,7 +81,8 @@ Grade StageStats::GetGrade( PlayerNumber pn ) iTapNoteScores[pn][TNS_GREAT] == 0 && iTapNoteScores[pn][TNS_GOOD] == 0 && iTapNoteScores[pn][TNS_BOO] == 0 && - iTapNoteScores[pn][TNS_MISS] == 0 ) + iTapNoteScores[pn][TNS_MISS] == 0 && + iHoldNoteScores[pn][HNS_NG] == 0 ) return GRADE_AAAA; if ( fPercentDancePoints == 1.00 ) return GRADE_AAA;