Allow song timing to be used when playing.
Admitedly, this may not be the best implementation. As usual, if you can do better, go for it.
This commit is contained in:
@@ -2354,12 +2354,16 @@ void ScreenEdit::TransitionEditState( EditState em )
|
||||
|
||||
case STATE_PLAYING:
|
||||
AdjustSync::HandleSongEnd();
|
||||
if (!GAMESTATE->m_bIsUsingStepTiming)
|
||||
GAMESTATE->m_pCurSteps[PLAYER_1]->m_Timing = backupStepTiming;
|
||||
if( AdjustSync::IsSyncDataChanged() )
|
||||
ScreenSaveSync::PromptSaveSync();
|
||||
break;
|
||||
|
||||
case STATE_RECORDING:
|
||||
SetDirty( true );
|
||||
if (!GAMESTATE->m_bIsUsingStepTiming)
|
||||
GAMESTATE->m_pCurSteps[PLAYER_1]->m_Timing = backupStepTiming;
|
||||
SaveUndo();
|
||||
|
||||
// delete old TapNotes in the range
|
||||
@@ -2410,6 +2414,12 @@ void ScreenEdit::TransitionEditState( EditState em )
|
||||
GAMESTATE->UpdateSongPosition( fSeconds, GetAppropriateTiming(), RageZeroTimer, true );
|
||||
|
||||
GAMESTATE->m_bGameplayLeadIn.Set( false );
|
||||
|
||||
if (!GAMESTATE->m_bIsUsingStepTiming)
|
||||
{
|
||||
backupStepTiming = GetAppropriateTiming();
|
||||
GAMESTATE->m_pCurSteps[PLAYER_1]->m_Timing = GAMESTATE->m_pCurSong->m_SongTiming;
|
||||
}
|
||||
|
||||
/* Reset the note skin, in case preferences have changed. */
|
||||
// XXX
|
||||
|
||||
@@ -251,6 +251,13 @@ protected:
|
||||
|
||||
BitmapText m_textInputTips;
|
||||
|
||||
/**
|
||||
* @brief Keep a backup of the present Step TimingData when
|
||||
* entering a playing or recording state.
|
||||
*
|
||||
* This is mainly to allow playing a chart with Song Timing. */
|
||||
TimingData backupStepTiming;
|
||||
|
||||
/** @brief The current TapNote that would be inserted. */
|
||||
TapNote m_selectedTap;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user