support setting perspective in DefaultModifiers pref
This commit is contained in:
@@ -274,9 +274,7 @@ bool GameState::IsPlayable( const ModeChoice& mc )
|
||||
|
||||
bool GameState::IsPlayerEnabled( PlayerNumber pn )
|
||||
{
|
||||
// In battle and rave, all players are present. Non-human players are CPU controlled.
|
||||
if( m_PlayMode == PLAY_MODE_BATTLE )
|
||||
return true;
|
||||
// In rave, all players are present. Non-human players are CPU controlled.
|
||||
if( m_PlayMode == PLAY_MODE_RAVE )
|
||||
return true;
|
||||
|
||||
|
||||
@@ -228,3 +228,12 @@ void NoteFieldPositioning::GetNamesForCurrentGame(vector<CString> &IDs)
|
||||
IDs.push_back(Modes[i].m_Name);
|
||||
}
|
||||
}
|
||||
|
||||
bool NoteFieldPositioning::IsValidModeForAnyStyle(CString mode) const
|
||||
{
|
||||
for(unsigned i = 0; i < Modes.size(); ++i)
|
||||
if(Modes[i].m_Name.CompareNoCase(mode)==0)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -55,7 +55,8 @@ public:
|
||||
void Load(PlayerNumber pn);
|
||||
|
||||
void GetNamesForCurrentGame(vector<CString> &IDs);
|
||||
bool IsValidModeForCurrentGame(CString mode) const { return GetID(mode) != -1; }
|
||||
bool IsValidModeForCurrentStyle(CString mode) const;
|
||||
bool IsValidModeForAnyStyle(CString mode) const;
|
||||
|
||||
private:
|
||||
CString m_Filename;
|
||||
|
||||
@@ -203,7 +203,7 @@ void PlayerOptions::FromString( CString sOptions )
|
||||
else if( sBit == "timingassist")m_bTimingAssist = true;
|
||||
else if( sBit == "incoming" ) m_fPerspectiveTilt = -1;
|
||||
else if( sBit == "space" ) m_fPerspectiveTilt = +1;
|
||||
else if( GAMESTATE->m_pPosition->IsValidModeForCurrentGame(sBit) )
|
||||
else if( GAMESTATE->m_pPosition->IsValidModeForAnyStyle(sBit) )
|
||||
m_sPositioning = sBit;
|
||||
else if( NOTESKIN->DoesNoteSkinExist(sBit) )
|
||||
m_sNoteSkin = sBit;
|
||||
|
||||
Reference in New Issue
Block a user