[warps] my attempt at making warps work. see commit message.
+ TimingData: rewrote GetBeatAndBPSFromElapsedTimeNoOffset and GetBeatFromElapsedTimeNoOffset to make it simpler and compute times correctly, by going through 3 arrays at the same time. + TimingData: added TimingData::IsWarpAtRow(int) just in case. + The skipping part is now handled by TimingData. Current issues: + the rewritten function does not check if the vectors are sorted. + if you press the notes after the skip before the skip is reached, the notes in the warp range got hit instead because m_iWarpBeginRow was not set before the warp is reached. + the notes after the skipped part are not judged if hit before the warp is reached and the warp is big enough.
This commit is contained in:
+3
-1
@@ -962,7 +962,8 @@ void GameState::UpdateSongPosition( float fPositionSeconds, const TimingData &ti
|
||||
ASSERT_M( m_fSongBeat > -2000, ssprintf("Song beat %f at %f seconds", m_fSongBeat, fPositionSeconds) );
|
||||
|
||||
//if( m_iWarpBeginRow != -1 || m_iWarpEndRow == -1 )
|
||||
|
||||
|
||||
/*
|
||||
if( m_iWarpBeginRow != -1 && m_fWarpDestination > 0.0f )
|
||||
{
|
||||
float fWarpLength = m_fWarpDestination-NoteRowToBeat(m_iWarpBeginRow);
|
||||
@@ -973,6 +974,7 @@ void GameState::UpdateSongPosition( float fPositionSeconds, const TimingData &ti
|
||||
BeatToNoteRow(m_fWarpDestination));
|
||||
fPositionSeconds += (fWarpLength * m_fCurBPS);
|
||||
}
|
||||
*/
|
||||
|
||||
m_fMusicSeconds = fPositionSeconds;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user