Use StepAttacks instead.

This deprecates the GetSongAttacks lua function.

Next up: make it so that no text is displayed if
Step Attacks are on, but display "No Attacks" if
attacks are turned off.
This commit is contained in:
Jason Felds
2011-06-24 12:12:27 -04:00
parent f2d1ca1d4b
commit fcf9e335e6
7 changed files with 22 additions and 14 deletions
+10 -7
View File
@@ -37,7 +37,7 @@ void PlayerOptions::Init()
m_fBlind = 0; m_SpeedfBlind = 1.0f;
m_fCover = 0; m_SpeedfCover = 1.0f;
m_fRandAttack = 0; m_SpeedfRandAttack = 1.0f;
m_fSongAttack = 1; m_SpeedfSongAttack = 1.0f;
m_fStepAttack = 1; m_SpeedfStepAttack = 1.0f;
m_fPlayerAutoPlay = 0; m_SpeedfPlayerAutoPlay = 1.0f;
m_bSetTiltOrSkew = false;
m_fPerspectiveTilt = 0; m_SpeedfPerspectiveTilt = 1.0f;
@@ -73,7 +73,7 @@ void PlayerOptions::Approach( const PlayerOptions& other, float fDeltaSeconds )
APPROACH( fBlind );
APPROACH( fCover );
APPROACH( fRandAttack );
APPROACH( fSongAttack );
APPROACH( fStepAttack );
APPROACH( fPlayerAutoPlay );
APPROACH( fPerspectiveTilt );
APPROACH( fSkew );
@@ -180,7 +180,7 @@ void PlayerOptions::GetMods( vector<RString> &AddTo, bool bForceNoteSkin ) const
AddPart( AddTo, m_fCover, "Cover" );
AddPart( AddTo, m_fRandAttack, "RandomAttacks" );
AddPart( AddTo, m_fSongAttack, "SongAttacks" );
AddPart( AddTo, m_fStepAttack, "StepAttacks" );
AddPart( AddTo, m_fPlayerAutoPlay, "PlayerAutoPlay" );
AddPart( AddTo, m_fPassmark, "Passmark" );
@@ -417,7 +417,7 @@ bool PlayerOptions::FromOneModString( const RString &sOneMod, RString &sErrorOut
else if( sBit == "blind" ) SET_FLOAT( fBlind )
else if( sBit == "cover" ) SET_FLOAT( fCover )
else if( sBit == "randomattacks" ) SET_FLOAT( fRandAttack )
else if( sBit == "songattacks" ) SET_FLOAT( fSongAttack )
else if( sBit == "stepattacks" ) SET_FLOAT( fStepAttack )
else if( sBit == "playerautoplay" ) SET_FLOAT( fPlayerAutoPlay )
else if( sBit == "passmark" ) SET_FLOAT( fPassmark )
else if( sBit == "overhead" ) { m_bSetTiltOrSkew = true; m_fSkew = 0; m_fPerspectiveTilt = 0; m_SpeedfSkew = m_SpeedfPerspectiveTilt = speed; }
@@ -657,7 +657,7 @@ bool PlayerOptions::operator==( const PlayerOptions &other ) const
COMPARE(m_fBlind);
COMPARE(m_fCover);
COMPARE(m_fRandAttack);
COMPARE(m_fSongAttack);
COMPARE(m_fStepAttack);
COMPARE(m_fPlayerAutoPlay);
COMPARE(m_fPerspectiveTilt);
COMPARE(m_fSkew);
@@ -713,7 +713,7 @@ bool PlayerOptions::IsEasierForSongAndSteps( Song* pSong, Steps* pSteps, PlayerN
if( m_bTransforms[TRANSFORM_ECHO] ) return true;
// Removing attacks is easier in general.
if (!m_fSongAttack && !m_fRandAttack && pSong->HasAttacks())
if (!m_fStepAttack && !m_fRandAttack && pSteps->HasAttacks())
return true;
if( m_fCover ) return true;
@@ -961,7 +961,9 @@ public:
DEFINE_METHOD( GetBlind, m_fBlind )
DEFINE_METHOD( GetCover, m_fCover )
DEFINE_METHOD( GetRandomAttacks, m_fRandAttack )
DEFINE_METHOD( GetSongAttacks, m_fSongAttack )
// This one is deprecated.
DEFINE_METHOD( GetSongAttacks, m_fStepAttack )
DEFINE_METHOD( GetStepAttacks, m_fStepAttack )
DEFINE_METHOD( GetSkew, m_fSkew )
DEFINE_METHOD( GetPassmark, m_fPassmark )
DEFINE_METHOD( GetRandomSpeed, m_fRandomSpeed )
@@ -988,6 +990,7 @@ public:
// SetSkew
ADD_METHOD( GetSongAttacks );
// SetSongAttacks
ADD_METHOD( GetStepAttacks );
ADD_METHOD( GetCMod );
ADD_METHOD( GetXMod );