From 71df5d0d3c6cbab3b3b9604073ca6ce2070d922c Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Wed, 26 May 2004 04:33:07 +0000 Subject: [PATCH] fix difficulty icon placement in reverse course songs fix global modifiers tweening in --- stepmania/src/Attack.h | 3 ++- stepmania/src/GameState.cpp | 7 ++++--- stepmania/src/ScreenGameplay.cpp | 4 ++-- stepmania/src/Trail.cpp | 1 + 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/stepmania/src/Attack.h b/stepmania/src/Attack.h index 29c45a18df..9a92fb0e78 100644 --- a/stepmania/src/Attack.h +++ b/stepmania/src/Attack.h @@ -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 AttackArray; diff --git a/stepmania/src/GameState.cpp b/stepmania/src/GameState.cpp index dd6dac4c82..59b75bedf4 100644 --- a/stepmania/src/GameState.cpp +++ b/stepmania/src/GameState.cpp @@ -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 */ diff --git a/stepmania/src/ScreenGameplay.cpp b/stepmania/src/ScreenGameplay.cpp index 224831e905..c2779f2343 100644 --- a/stepmania/src/ScreenGameplay.cpp +++ b/stepmania/src/ScreenGameplay.cpp @@ -801,7 +801,6 @@ void ScreenGameplay::SetupSong( int p, int iSongIndex ) GAMESTATE->m_ModsToApply[p].clear(); for( unsigned i=0; iUpdate(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; diff --git a/stepmania/src/Trail.cpp b/stepmania/src/Trail.cpp index 5ed9a5a128..a35a3ddef4 100644 --- a/stepmania/src/Trail.cpp +++ b/stepmania/src/Trail.cpp @@ -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 ); }