disallow locked steps in random courses
This commit is contained in:
@@ -23,7 +23,7 @@
|
|||||||
#include "CourseLoaderCRS.h"
|
#include "CourseLoaderCRS.h"
|
||||||
#include "LuaFunctions.h"
|
#include "LuaFunctions.h"
|
||||||
#include "LocalizedString.h"
|
#include "LocalizedString.h"
|
||||||
|
#include "StepsUtil.h"
|
||||||
|
|
||||||
static const char *CourseTypeNames[] = {
|
static const char *CourseTypeNames[] = {
|
||||||
"Nonstop",
|
"Nonstop",
|
||||||
@@ -501,6 +501,8 @@ bool Course::GetTrailUnsorted( StepsType st, CourseDifficulty cd, Trail &trail )
|
|||||||
|
|
||||||
vector<Steps*> vpMatchingSteps;
|
vector<Steps*> vpMatchingSteps;
|
||||||
(*song)->GetSteps( vpMatchingSteps, st, e->baseDifficulty, e->iLowMeter, e->iHighMeter );
|
(*song)->GetSteps( vpMatchingSteps, st, e->baseDifficulty, e->iLowMeter, e->iHighMeter );
|
||||||
|
StepsUtil::RemoveLockedSteps( *song, vpMatchingSteps );
|
||||||
|
|
||||||
if( vpMatchingSteps.empty() )
|
if( vpMatchingSteps.empty() )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
@@ -519,6 +521,7 @@ bool Course::GetTrailUnsorted( StepsType st, CourseDifficulty cd, Trail &trail )
|
|||||||
else
|
else
|
||||||
continue;
|
continue;
|
||||||
pResolvedSong->GetSteps( vpPossibleSteps, st, e->baseDifficulty, e->iLowMeter, e->iHighMeter );
|
pResolvedSong->GetSteps( vpPossibleSteps, st, e->baseDifficulty, e->iLowMeter, e->iHighMeter );
|
||||||
|
StepsUtil::RemoveLockedSteps( pResolvedSong, vpPossibleSteps );
|
||||||
}
|
}
|
||||||
|
|
||||||
ASSERT( !vpPossibleSteps.empty() ); // if no steps are playable, this shouldn't be a possible song
|
ASSERT( !vpPossibleSteps.empty() ); // if no steps are playable, this shouldn't be a possible song
|
||||||
|
|||||||
Reference in New Issue
Block a user