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:
Glenn Maynard
2004-06-05 08:20:07 +00:00
parent 398eb05fcb
commit 1246e086f2
+4
View File
@@ -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);