fix note skin loading: need to set m_pPlayerState m_sNoteSkin before StoreSelectedOptions, and need to call StoreSelectedOptions before TransitionEditMode (since it calls RestoreSelectedOptions
This commit is contained in:
@@ -528,7 +528,6 @@ void ScreenEdit::Init()
|
|||||||
m_pSteps->GetNoteData( noteData );
|
m_pSteps->GetNoteData( noteData );
|
||||||
|
|
||||||
|
|
||||||
TransitionEditMode( MODE_EDITING );
|
|
||||||
GAMESTATE->m_bPastHereWeGo = false;
|
GAMESTATE->m_bPastHereWeGo = false;
|
||||||
|
|
||||||
GAMESTATE->m_bEditing = true;
|
GAMESTATE->m_bEditing = true;
|
||||||
@@ -536,16 +535,20 @@ void ScreenEdit::Init()
|
|||||||
GAMESTATE->m_fSongBeat = 0;
|
GAMESTATE->m_fSongBeat = 0;
|
||||||
m_fTrailingBeat = GAMESTATE->m_fSongBeat;
|
m_fTrailingBeat = GAMESTATE->m_fSongBeat;
|
||||||
|
|
||||||
GAMESTATE->m_pPlayerState[PLAYER_1]->m_PlayerOptions.m_fScrollSpeed = 1;
|
|
||||||
GAMESTATE->m_SongOptions.m_fMusicRate = 1;
|
|
||||||
/* Not all games have a noteskin named "note" ... */
|
/* Not all games have a noteskin named "note" ... */
|
||||||
if( NOTESKIN->DoesNoteSkinExist("note") )
|
if( NOTESKIN->DoesNoteSkinExist("note") )
|
||||||
GAMESTATE->m_pPlayerState[PLAYER_1]->m_PlayerOptions.m_sNoteSkin = "note"; // change noteskin before loading all of the edit Actors
|
GAMESTATE->m_pPlayerState[PLAYER_1]->m_PlayerOptions.m_sNoteSkin = "note"; // change noteskin before loading all of the edit Actors
|
||||||
|
// Reset player options, but don't reset the current NoteSkin
|
||||||
|
CString sNoteSkin = GAMESTATE->m_pPlayerState[PLAYER_1]->m_PlayerOptions.m_sNoteSkin;
|
||||||
|
GAMESTATE->m_pPlayerState[PLAYER_1]->m_PlayerOptions.Init(); // don't allow weird options in editor. It doesn't handle reverse well.
|
||||||
|
GAMESTATE->m_pPlayerState[PLAYER_1]->m_PlayerOptions.m_sNoteSkin = sNoteSkin;
|
||||||
|
|
||||||
GAMESTATE->ResetNoteSkins();
|
GAMESTATE->ResetNoteSkins();
|
||||||
GAMESTATE->StoreSelectedOptions();
|
GAMESTATE->StoreSelectedOptions();
|
||||||
|
|
||||||
g_iShiftAnchor = -1;
|
g_iShiftAnchor = -1;
|
||||||
|
|
||||||
|
TransitionEditMode( MODE_EDITING );
|
||||||
|
|
||||||
this->AddChild( &m_Background );
|
this->AddChild( &m_Background );
|
||||||
|
|
||||||
@@ -572,11 +575,6 @@ void ScreenEdit::Init()
|
|||||||
m_Clipboard.SetNumTracks( m_NoteDataEdit.GetNumTracks() );
|
m_Clipboard.SetNumTracks( m_NoteDataEdit.GetNumTracks() );
|
||||||
|
|
||||||
|
|
||||||
// Reset player options, but don't reset the current NoteSkin
|
|
||||||
CString sNoteSkin = GAMESTATE->m_pPlayerState[PLAYER_1]->m_PlayerOptions.m_sNoteSkin;
|
|
||||||
GAMESTATE->m_pPlayerState[PLAYER_1]->m_PlayerOptions.Init(); // don't allow weird options in editor. It doesn't handle reverse well.
|
|
||||||
GAMESTATE->m_pPlayerState[PLAYER_1]->m_PlayerOptions.m_sNoteSkin = sNoteSkin;
|
|
||||||
|
|
||||||
/* XXX: Do we actually have to send real note data here, and to m_NoteFieldRecord?
|
/* XXX: Do we actually have to send real note data here, and to m_NoteFieldRecord?
|
||||||
* (We load again on play/record.) */
|
* (We load again on play/record.) */
|
||||||
m_Player.Init( "Player", GAMESTATE->m_pPlayerState[PLAYER_1], NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL );
|
m_Player.Init( "Player", GAMESTATE->m_pPlayerState[PLAYER_1], NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL );
|
||||||
|
|||||||
Reference in New Issue
Block a user