Fix autoplay weirdness in editor
This commit is contained in:
@@ -88,7 +88,8 @@ void Player::Load( PlayerNumber pn, NoteData* pNoteData, LifeMeter* pLM, ScoreDi
|
||||
m_pScore = pScore;
|
||||
m_pInventory = pInventory;
|
||||
m_pScoreKeeper = pScoreKeeper;
|
||||
m_iRowLastCrossed = -1;
|
||||
m_iRowLastCrossed = BeatToNoteRowNotRounded( GAMESTATE->m_fSongBeat ) - 1;
|
||||
// m_iRowLastCrossed = -1;
|
||||
|
||||
/* Ensure that this is up-to-date. */
|
||||
GAMESTATE->m_pPosition->Load(pn);
|
||||
|
||||
@@ -1461,15 +1461,17 @@ void ScreenEdit::HandleAreaMenuChoice( AreaMenuChoice c, int* iAnswers )
|
||||
|
||||
m_EditMode = MODE_PLAYING;
|
||||
|
||||
/* Give a 1 measure lead-in. Set this before loading Player, so it knows
|
||||
* where we're starting. */
|
||||
GAMESTATE->m_fSongBeat = m_NoteFieldEdit.m_fBeginMarker - 4;
|
||||
|
||||
m_Player.Load( PLAYER_1, (NoteData*)&m_NoteFieldEdit, NULL, NULL, NULL, NULL );
|
||||
GAMESTATE->m_PlayerController[PLAYER_1] = PREFSMAN->m_bAutoPlay?PC_AUTOPLAY:PC_HUMAN;
|
||||
|
||||
m_rectRecordBack.StopTweening();
|
||||
m_rectRecordBack.BeginTweening( 0.5f );
|
||||
m_rectRecordBack.SetDiffuse( RageColor(0,0,0,0.8f) );
|
||||
|
||||
GAMESTATE->m_fSongBeat = m_NoteFieldEdit.m_fBeginMarker - 4; // give a 1 measure lead-in
|
||||
float fStartSeconds = m_pSong->GetElapsedTimeFromBeat(GAMESTATE->m_fSongBeat) ;
|
||||
const float fStartSeconds = m_pSong->GetElapsedTimeFromBeat(GAMESTATE->m_fSongBeat) ;
|
||||
LOG->Trace( "Starting playback at %f", fStartSeconds );
|
||||
m_soundMusic.SetPlaybackRate( GAMESTATE->m_SongOptions.m_fMusicRate );
|
||||
m_soundMusic.SetPositionSeconds( fStartSeconds );
|
||||
|
||||
Reference in New Issue
Block a user