Only create autogen steps pointers if steps autogen is enabled. This fixes
random courses taking too long to generate with autogen disabled: it has to iterate over *all* steps (including the unused autogen steps); when outputting the catalog, this means it has to iterate over every song once per random course line per steps type per course difficulty. (test case of one 9-random-entry course with autogen off: ~10 seconds -> ~1.5 seconds; still too much)
This commit is contained in:
@@ -1091,6 +1091,10 @@ void Song::AddAutoGenNotes()
|
||||
if( HasNotes[stMissing] )
|
||||
continue;
|
||||
|
||||
/* If m_bAutogenSteps is disabled, only autogen lights. */
|
||||
if( !PREFSMAN->m_bAutogenSteps && stMissing != STEPS_TYPE_LIGHTS_CABINET )
|
||||
continue;
|
||||
|
||||
// missing Steps of this type
|
||||
int iNumTracksOfMissing = GAMEMAN->NotesTypeToNumTracks(stMissing);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user