Merge pull request #1945 from DinsFire64/autogenlightsfix

restore autogen lights
This commit is contained in:
dguzek
2019-12-17 20:35:31 -05:00
committed by GitHub
2 changed files with 22 additions and 1 deletions
+1 -1
View File
@@ -275,7 +275,7 @@ PrefsManager::PrefsManager() :
m_iSoundDevice ( "SoundDevice", "" ),
m_iRageSoundSampleCountClamp ("RageSoundSampleCountClamp", 0), //some sound drivers mask the sample location number, the most popular number for this is 2^27, this causes lockup after ~50 minutes at 44.1khz sample rate
m_iSoundPreferredSampleRate ( "SoundPreferredSampleRate", 0 ),
m_sLightsStepsDifficulty ( "LightsStepsDifficulty", "medium" ),
m_sLightsStepsDifficulty ( "LightsStepsDifficulty", "hard,medium" ),
m_bAllowUnacceleratedRenderer ( "AllowUnacceleratedRenderer", false ),
m_bThreadedInput ( "ThreadedInput", true ),
m_bThreadedMovieDecode ( "ThreadedMovieDecode", true ),
+21
View File
@@ -1452,6 +1452,27 @@ void ScreenGameplay::LoadLights()
NoteData TapNoteData1;
pSteps->GetNoteData( TapNoteData1 );
//taken from oitg, restores arrow -> marquee/bass light mapping.
if( asDifficulties.size() > 1 )
{
Difficulty d2 = StringToDifficulty( asDifficulties[1] );
Steps *pSteps2;
pSteps2 = SongUtil::GetClosestNotes( GAMESTATE->m_pCurSong, st, d2 );
if(pSteps2 != nullptr)
{
NoteData TapNoteData2;
pSteps2->GetNoteData( TapNoteData2 );
NoteDataUtil::LoadTransformedLightsFromTwo( TapNoteData1, TapNoteData2, m_CabinetLightsNoteData );
return;
}
/* fall through */
}
NoteDataUtil::LoadTransformedLights( TapNoteData1, m_CabinetLightsNoteData, GAMEMAN->GetStepsTypeInfo(StepsType_lights_cabinet).iNumTracks );
}