optimize
This commit is contained in:
@@ -336,6 +336,10 @@ void PlayerMinus::Update( float fDeltaTime )
|
|||||||
{
|
{
|
||||||
const GameState::TransformToApply_t &tr = GAMESTATE->m_TransformsToApply[m_PlayerNumber][j];
|
const GameState::TransformToApply_t &tr = GAMESTATE->m_TransformsToApply[m_PlayerNumber][j];
|
||||||
|
|
||||||
|
/* Note that runtime effects like these currently must not change hold
|
||||||
|
* notes. CopyRange below converts through 4s, which means the hold note
|
||||||
|
* array will be reconstructed; if hold notes end up in a different order,
|
||||||
|
* they won't align with this->m_HoldNoteScores. */
|
||||||
LOG->Trace( "Applying transform from %f to %f", tr.fStartBeat, tr.fEndBeat );
|
LOG->Trace( "Applying transform from %f to %f", tr.fStartBeat, tr.fEndBeat );
|
||||||
switch( tr.trans )
|
switch( tr.trans )
|
||||||
{
|
{
|
||||||
@@ -822,6 +826,7 @@ void PlayerMinus::RandomiseNotes( int iNoteRow )
|
|||||||
{
|
{
|
||||||
const int NewNoteRow = (int)(iNoteRow + 50 / GAMESTATE->m_PlayerOptions[m_PlayerNumber].m_fScrollSpeed); // change the row to look ahead from based upon their speed mod
|
const int NewNoteRow = (int)(iNoteRow + 50 / GAMESTATE->m_PlayerOptions[m_PlayerNumber].m_fScrollSpeed); // change the row to look ahead from based upon their speed mod
|
||||||
|
|
||||||
|
bool UpdateNoteField = false;
|
||||||
int iNumOfTracks = GetNumTracks();
|
int iNumOfTracks = GetNumTracks();
|
||||||
for( int t=0; t+1 < iNumOfTracks; t++ )
|
for( int t=0; t+1 < iNumOfTracks; t++ )
|
||||||
{
|
{
|
||||||
@@ -833,9 +838,10 @@ void PlayerMinus::RandomiseNotes( int iNoteRow )
|
|||||||
{
|
{
|
||||||
SetTapNote(t, NewNoteRow, t2);
|
SetTapNote(t, NewNoteRow, t2);
|
||||||
SetTapNote(iRandomTrackToSwapWith, NewNoteRow, t1);
|
SetTapNote(iRandomTrackToSwapWith, NewNoteRow, t1);
|
||||||
|
UpdateNoteField = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if( UpdateNoteField )
|
||||||
m_pNoteField->CopyRange( this, NewNoteRow, NewNoteRow, NewNoteRow );
|
m_pNoteField->CopyRange( this, NewNoteRow, NewNoteRow, NewNoteRow );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user