fix difficulty icon placement in reverse course songs
fix global modifiers tweening in
This commit is contained in:
@@ -12,11 +12,12 @@ struct Attack
|
||||
float fSecsRemaining;
|
||||
CString sModifier;
|
||||
bool bOn; // for GAMESTATE
|
||||
bool bGlobal; // true for song-wide course mods
|
||||
|
||||
void GetAttackBeats( const Song *song, PlayerNumber pn, float &fStartBeat, float &fEndBeat ) const;
|
||||
bool IsBlank() { return sModifier.empty(); }
|
||||
void MakeBlank() { sModifier=""; }
|
||||
Attack() { fStartSecond = -1; bOn = false; }
|
||||
Attack() { fStartSecond = -1; bOn = false; bGlobal = false; }
|
||||
};
|
||||
typedef vector<Attack> AttackArray;
|
||||
|
||||
|
||||
@@ -430,9 +430,10 @@ void GameState::Update( float fDelta )
|
||||
// converted into the current music time.
|
||||
ASSERT( attack.fStartSecond != -1 );
|
||||
|
||||
const bool bCurrentlyEnabled =
|
||||
attack.fStartSecond < this->m_fMusicSeconds &&
|
||||
m_fMusicSeconds < attack.fStartSecond+attack.fSecsRemaining;
|
||||
bool bCurrentlyEnabled =
|
||||
attack.bGlobal ||
|
||||
( attack.fStartSecond < this->m_fMusicSeconds &&
|
||||
m_fMusicSeconds < attack.fStartSecond+attack.fSecsRemaining );
|
||||
|
||||
if( m_ActiveAttacks[p][s].bOn == bCurrentlyEnabled )
|
||||
continue; /* OK */
|
||||
|
||||
@@ -801,7 +801,6 @@ void ScreenGameplay::SetupSong( int p, int iSongIndex )
|
||||
GAMESTATE->m_ModsToApply[p].clear();
|
||||
for( unsigned i=0; i<m_asModifiersQueue[p][iSongIndex].size(); ++i )
|
||||
{
|
||||
/* Hack: Course modifiers that are set to start immediately shouldn't tween on. */
|
||||
Attack a = m_asModifiersQueue[p][iSongIndex][i];
|
||||
if( a.fStartSecond == 0 )
|
||||
a.fStartSecond = -1; // now
|
||||
@@ -813,7 +812,8 @@ void ScreenGameplay::SetupSong( int p, int iSongIndex )
|
||||
/* Update attack bOn flags. */
|
||||
GAMESTATE->Update(0);
|
||||
GAMESTATE->RebuildPlayerOptionsFromActiveAttacks( (PlayerNumber)p );
|
||||
/* Snap. */
|
||||
|
||||
/* Hack: Course modifiers that are set to start immediately shouldn't tween on. */
|
||||
GAMESTATE->m_CurrentPlayerOptions[p] = GAMESTATE->m_PlayerOptions[p];
|
||||
|
||||
NoteData pOriginalNoteData;
|
||||
|
||||
@@ -24,6 +24,7 @@ void TrailEntry::GetAttackArray( AttackArray &out ) const
|
||||
a.fSecsRemaining = 10000; /* whole song */
|
||||
a.level = ATTACK_LEVEL_1;
|
||||
a.sModifier = Modifiers;
|
||||
a.bGlobal = true;
|
||||
|
||||
out.push_back( a );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user