Fix attacks not working properly with random songs in the editor.
This commit is contained in:
@@ -3315,10 +3315,16 @@ void ScreenEdit::SetupCourseAttacks()
|
|||||||
|
|
||||||
if( GAMESTATE->m_pCurCourse )
|
if( GAMESTATE->m_pCurCourse )
|
||||||
{
|
{
|
||||||
if( EDIT_MODE.GetValue() != EditMode_CourseMods )
|
AttackArray Attacks;
|
||||||
|
|
||||||
|
if( EDIT_MODE == EditMode_CourseMods )
|
||||||
|
{
|
||||||
|
Attacks = GAMESTATE->m_pCurCourse->m_vEntries[GAMESTATE->m_iEditCourseEntryIndex].attacks;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
GAMESTATE->m_pCurCourse->RevertFromDisk(); // Remove this and have a separate reload key?
|
GAMESTATE->m_pCurCourse->RevertFromDisk(); // Remove this and have a separate reload key?
|
||||||
|
|
||||||
AttackArray Attacks;
|
|
||||||
for( unsigned e = 0; e < GAMESTATE->m_pCurCourse->m_vEntries.size(); ++e )
|
for( unsigned e = 0; e < GAMESTATE->m_pCurCourse->m_vEntries.size(); ++e )
|
||||||
{
|
{
|
||||||
if( GAMESTATE->m_pCurCourse->m_vEntries[e].pSong != m_pSong )
|
if( GAMESTATE->m_pCurCourse->m_vEntries[e].pSong != m_pSong )
|
||||||
@@ -3327,9 +3333,10 @@ void ScreenEdit::SetupCourseAttacks()
|
|||||||
Attacks = GAMESTATE->m_pCurCourse->m_vEntries[e].attacks;
|
Attacks = GAMESTATE->m_pCurCourse->m_vEntries[e].attacks;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
for( unsigned i=0; i<Attacks.size(); ++i )
|
FOREACH( Attack, Attacks, attack )
|
||||||
GAMESTATE->m_pPlayerState[PLAYER_1]->LaunchAttack( Attacks[i] );
|
GAMESTATE->m_pPlayerState[PLAYER_1]->LaunchAttack( *attack );
|
||||||
}
|
}
|
||||||
GAMESTATE->m_pPlayerState[PLAYER_1]->RebuildPlayerOptionsFromActiveAttacks();
|
GAMESTATE->m_pPlayerState[PLAYER_1]->RebuildPlayerOptionsFromActiveAttacks();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user