fix difficulty changes not visible in CourseEntryDisplay
This commit is contained in:
@@ -752,20 +752,22 @@ void Course::GetTrailUnsorted( StepsType st, CourseDifficulty cd, Trail &trail )
|
|||||||
if( !pSong || !pSteps )
|
if( !pSong || !pSteps )
|
||||||
continue; // this song entry isn't playable. Skip.
|
continue; // this song entry isn't playable. Skip.
|
||||||
|
|
||||||
|
Difficulty dc = pSteps->GetDifficulty();
|
||||||
if( entry_difficulty != COURSE_DIFFICULTY_REGULAR )
|
if( entry_difficulty != COURSE_DIFFICULTY_REGULAR )
|
||||||
{
|
{
|
||||||
/* See if we can find a NoteData after adjusting the difficulty by COURSE_DIFFICULTY_CLASS_CHANGE.
|
/* See if we can find a NoteData after adjusting the difficulty by COURSE_DIFFICULTY_CLASS_CHANGE.
|
||||||
* If we can't, just use the one we already have. */
|
* If we can't, just use the one we already have. */
|
||||||
Difficulty original_dc = pSteps->GetDifficulty();
|
Difficulty new_dc = Difficulty( dc + COURSE_DIFFICULTY_CLASS_CHANGE[entry_difficulty] );
|
||||||
Difficulty dc = Difficulty( original_dc + COURSE_DIFFICULTY_CLASS_CHANGE[entry_difficulty] );
|
new_dc = clamp( new_dc, DIFFICULTY_BEGINNER, DIFFICULTY_CHALLENGE );
|
||||||
dc = clamp( dc, DIFFICULTY_BEGINNER, DIFFICULTY_CHALLENGE );
|
|
||||||
bool bChangedDifficulty = false;
|
bool bChangedDifficulty = false;
|
||||||
if( dc != original_dc )
|
if( new_dc != dc )
|
||||||
{
|
{
|
||||||
Steps* pNewNotes = pSong->GetStepsByDifficulty( st, dc );
|
Steps* pNewSteps = pSong->GetStepsByDifficulty( st, new_dc );
|
||||||
if( pNewNotes )
|
if( pNewSteps )
|
||||||
{
|
{
|
||||||
pSteps = pNewNotes;
|
dc = new_dc;
|
||||||
|
pSteps = pNewSteps;
|
||||||
bChangedDifficulty = true;
|
bChangedDifficulty = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -807,7 +809,7 @@ void Course::GetTrailUnsorted( StepsType st, CourseDifficulty cd, Trail &trail )
|
|||||||
te.bMystery = e.mystery;
|
te.bMystery = e.mystery;
|
||||||
te.iLowMeter = low_meter;
|
te.iLowMeter = low_meter;
|
||||||
te.iHighMeter = high_meter;
|
te.iHighMeter = high_meter;
|
||||||
te.dc = e.difficulty;
|
te.dc = dc;
|
||||||
trail.m_vEntries.push_back( te );
|
trail.m_vEntries.push_back( te );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user