fix difficulty icon placement in reverse course songs

fix global modifiers tweening in
This commit is contained in:
Glenn Maynard
2004-05-26 04:33:07 +00:00
parent 55e06955bc
commit 71df5d0d3c
4 changed files with 9 additions and 6 deletions
+2 -1
View File
@@ -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;
+4 -3
View File
@@ -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 */
+2 -2
View File
@@ -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;
+1
View File
@@ -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 );
}