diff --git a/stepmania/src/PlayerAI.cpp b/stepmania/src/PlayerAI.cpp index c2521848c5..4fa9dcc782 100644 --- a/stepmania/src/PlayerAI.cpp +++ b/stepmania/src/PlayerAI.cpp @@ -82,8 +82,8 @@ TapNoteScore PlayerAI::GetTapNoteScore( PlayerNumber pn ) GAMESTATE->m_iLastPositiveSumOfAttackLevels[pn] : 0; - ASSERT( iCpuSkill>=0 && iCpuSkillm_PlayerController[pn] == PC_CPU ); + ASSERT_M( iCpuSkill>=0 && iCpuSkillm_PlayerController[pn] == PC_CPU, ssprintf("%i", GAMESTATE->m_PlayerController[pn]) ); iCpuSkill -= iSumOfAttackLevels*3; CLAMP( iCpuSkill, 0, NUM_SKILL_LEVELS-1 ); diff --git a/stepmania/src/ScreenGameplay.cpp b/stepmania/src/ScreenGameplay.cpp index 4b8932a1b9..d1ba1f192a 100644 --- a/stepmania/src/ScreenGameplay.cpp +++ b/stepmania/src/ScreenGameplay.cpp @@ -933,6 +933,8 @@ void ScreenGameplay::LoadNextSong() GAMESTATE->m_PlayerController[p] = PC_CPU; int iMeter = GAMESTATE->m_pCurNotes[p]->GetMeter(); int iNewSkill = SCALE( iMeter, MIN_METER, MAX_METER, 0, NUM_SKILL_LEVELS-1 ); + /* Watch out: songs aren't actually bound by MAX_METER. */ + iNewSkill = clamp( iNewSkill, 0, NUM_SKILL_LEVELS-1 ); GAMESTATE->m_iCpuSkill[p] = iNewSkill; } else if( PREFSMAN->m_bAutoPlay )