From ab84dffa0f7a8a21381943e9225ce9a1952f5bf7 Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Mon, 27 Mar 2006 21:53:33 +0000 Subject: [PATCH] disallow locked steps in random courses --- stepmania/src/Course.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/stepmania/src/Course.cpp b/stepmania/src/Course.cpp index fd10b4e2b0..9154b886fa 100644 --- a/stepmania/src/Course.cpp +++ b/stepmania/src/Course.cpp @@ -23,7 +23,7 @@ #include "CourseLoaderCRS.h" #include "LuaFunctions.h" #include "LocalizedString.h" - +#include "StepsUtil.h" static const char *CourseTypeNames[] = { "Nonstop", @@ -501,6 +501,8 @@ bool Course::GetTrailUnsorted( StepsType st, CourseDifficulty cd, Trail &trail ) vector vpMatchingSteps; (*song)->GetSteps( vpMatchingSteps, st, e->baseDifficulty, e->iLowMeter, e->iHighMeter ); + StepsUtil::RemoveLockedSteps( *song, vpMatchingSteps ); + if( vpMatchingSteps.empty() ) continue; @@ -519,6 +521,7 @@ bool Course::GetTrailUnsorted( StepsType st, CourseDifficulty cd, Trail &trail ) else continue; 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