fix m_bAttackEndedThisUpdate being true when an attack begins
fix course global mods tweening
This commit is contained in:
@@ -281,13 +281,14 @@ void GameState::Update( float fDelta )
|
|||||||
{
|
{
|
||||||
Attack &attack = m_ActiveAttacks[p][s];
|
Attack &attack = m_ActiveAttacks[p][s];
|
||||||
const bool bCurrentlyEnabled =
|
const bool bCurrentlyEnabled =
|
||||||
|
attack.fStartSecond == -1 ||
|
||||||
(attack.fStartSecond < this->m_fMusicSeconds &&
|
(attack.fStartSecond < this->m_fMusicSeconds &&
|
||||||
m_fMusicSeconds < attack.fStartSecond+attack.fSecsRemaining);
|
m_fMusicSeconds < attack.fStartSecond+attack.fSecsRemaining);
|
||||||
|
|
||||||
if( m_ActiveAttacks[p][s].bOn == bCurrentlyEnabled )
|
if( m_ActiveAttacks[p][s].bOn == bCurrentlyEnabled )
|
||||||
continue; /* OK */
|
continue; /* OK */
|
||||||
|
|
||||||
if( !m_ActiveAttacks[p][s].bOn && bCurrentlyEnabled )
|
if( m_ActiveAttacks[p][s].bOn && !bCurrentlyEnabled )
|
||||||
m_bAttackEndedThisUpdate[p] = true;
|
m_bAttackEndedThisUpdate[p] = true;
|
||||||
|
|
||||||
bRebuildPlayerOptions = true;
|
bRebuildPlayerOptions = true;
|
||||||
|
|||||||
@@ -808,8 +808,10 @@ void ScreenGameplay::SetupSong( int p, int iSongIndex )
|
|||||||
if( GAMESTATE->m_ActiveAttacks[p][s].fStartSecond == 0 )
|
if( GAMESTATE->m_ActiveAttacks[p][s].fStartSecond == 0 )
|
||||||
GAMESTATE->m_ActiveAttacks[p][s].fStartSecond = -1;
|
GAMESTATE->m_ActiveAttacks[p][s].fStartSecond = -1;
|
||||||
}
|
}
|
||||||
|
/* Update attack bOn flags. */
|
||||||
|
GAMESTATE->Update(0);
|
||||||
GAMESTATE->RebuildPlayerOptionsFromActiveAttacks( (PlayerNumber)p );
|
GAMESTATE->RebuildPlayerOptionsFromActiveAttacks( (PlayerNumber)p );
|
||||||
|
/* Snap. */
|
||||||
GAMESTATE->m_CurrentPlayerOptions[p] = GAMESTATE->m_PlayerOptions[p];
|
GAMESTATE->m_CurrentPlayerOptions[p] = GAMESTATE->m_PlayerOptions[p];
|
||||||
|
|
||||||
NoteData pOriginalNoteData;
|
NoteData pOriginalNoteData;
|
||||||
|
|||||||
Reference in New Issue
Block a user