[splittiming]

- calculate m_fFirstBeat and m_fLastBeat correctly
- fix a crash caused by calculating by tidying the timing first.
- make editor go back to right place after playing (the editor should be fairly working now!)
This commit is contained in:
Thai Pangsakulyanont
2011-05-12 19:07:41 +07:00
parent 6847ef9087
commit a09e3d51c2
2 changed files with 11 additions and 11 deletions
+2 -2
View File
@@ -2372,11 +2372,11 @@ void ScreenEdit::TransitionEditState( EditState em )
GAMESTATE->m_pPlayerState[PLAYER_1]->m_Position.m_fSongBeat = m_fBeatToReturnTo;
// Make sure we're snapped.
GAMESTATE->m_pPlayerState[PLAYER_1]->m_Position.m_fSongBeat = Quantize( GAMESTATE->m_Position.m_fSongBeat, NoteTypeToBeat(m_SnapDisplay.GetNoteType()) );
GAMESTATE->m_pPlayerState[PLAYER_1]->m_Position.m_fSongBeat = Quantize( GAMESTATE->m_pPlayerState[PLAYER_1]->m_Position.m_fSongBeat, NoteTypeToBeat(m_SnapDisplay.GetNoteType()) );
/* Playing and recording have lead-ins, which may start before beat 0;
* make sure we don't stay there if we escaped out early. */
GAMESTATE->m_pPlayerState[PLAYER_1]->m_Position.m_fSongBeat = max( GAMESTATE->m_Position.m_fSongBeat, 0 );
GAMESTATE->m_pPlayerState[PLAYER_1]->m_Position.m_fSongBeat = max( GAMESTATE->m_pPlayerState[PLAYER_1]->m_Position.m_fSongBeat, 0 );
break;