comment + assert message

This commit is contained in:
AJ Kelly
2011-04-23 23:36:25 -05:00
parent f6c6c97aee
commit a04f956646
+3 -2
View File
@@ -14,10 +14,11 @@
#include "Style.h" #include "Style.h"
#include "Steps.h" #include "Steps.h"
static void GetStepsForSong( Song *pSong, vector<Steps*> &vpStepsOut ) static void GetStepsForSong( Song *pSong, vector<Steps*> &vpStepsOut )
{ {
SongUtil::GetSteps( pSong, vpStepsOut, GAMESTATE->GetCurrentStyle()->m_StepsType ); SongUtil::GetSteps( pSong, vpStepsOut, GAMESTATE->GetCurrentStyle()->m_StepsType );
// xxx: If the StepsType isn't valid for the current game, this will cause
// a crash when changing songs. -aj
StepsUtil::RemoveLockedSteps( pSong, vpStepsOut ); StepsUtil::RemoveLockedSteps( pSong, vpStepsOut );
StepsUtil::SortNotesArrayByDifficulty( vpStepsOut ); StepsUtil::SortNotesArrayByDifficulty( vpStepsOut );
} }
@@ -334,7 +335,7 @@ void ScreenOptionsEditCourse::ExportOptions( int iRow, const vector<PlayerNumber
if( pSong ) if( pSong )
{ {
Steps *pSteps = this->GetStepsForEntry( iEntryIndex ); Steps *pSteps = this->GetStepsForEntry( iEntryIndex );
ASSERT( pSteps ); ASSERT_M( pSteps, "No Steps for this Song!" );
CourseEntry ce; CourseEntry ce;
ce.songID.FromSong( pSong ); ce.songID.FromSong( pSong );
ce.stepsCriteria.m_difficulty = pSteps->GetDifficulty(); ce.stepsCriteria.m_difficulty = pSteps->GetDifficulty();