fix "transform mods that last for a whole song in a course get applied twice"

fix "impossible to get 100% on a course that uses AddMines" by calculating RadarValues after applying mods
Trail::GetRadarValues needs to do caching.  Performance is bad.
This commit is contained in:
Chris Danford
2004-07-23 04:45:48 +00:00
parent 23cedc1b83
commit 27ece3ecbf
11 changed files with 154 additions and 59 deletions
+21 -1
View File
@@ -3,9 +3,12 @@
#include "GameState.h"
#include "RageUtil.h"
#include "song.h"
#include "Foreach.h"
void Attack::GetAttackBeats( const Song *song, PlayerNumber pn, float &fStartBeat, float &fEndBeat ) const
{
ASSERT( song );
if( fStartSecond >= 0 )
{
CHECKPOINT;
@@ -19,7 +22,7 @@ void Attack::GetAttackBeats( const Song *song, PlayerNumber pn, float &fStartBea
ASSERT( GAMESTATE->m_pCurSong );
/* We're setting this effect on the fly. If it's an arrow-changing effect
* (transform or note skin), apply it in the future, past what's currently on
* (transform or note skin), apply it in the future, after what's currently on
* screen, so new arrows will scroll on screen with this effect. */
GAMESTATE->GetUndisplayedBeats( pn, fSecsRemaining, fStartBeat, fEndBeat );
}
@@ -39,6 +42,23 @@ bool Attack::operator== ( const Attack &rhs ) const
EQUAL(bGlobal);
}
bool Attack::ContainsTransformOrTurn() const
{
PlayerOptions po;
po.FromString( sModifier );
return po.ContainsTransformOrTurn();
}
bool AttackArray::ContainsTransformOrTurn() const
{
FOREACH_CONST( Attack, *this, a )
{
if( a->ContainsTransformOrTurn() )
return true;
}
return false;
}
/*
* (c) 2003-2004 Chris Danford
* All rights reserved.