allow per-player course difficulties (not well-tested yet, off by default)

This commit is contained in:
Glenn Maynard
2004-01-21 01:35:54 +00:00
parent ff7517e0f9
commit 6c71f9103f
12 changed files with 75 additions and 54 deletions
+7 -2
View File
@@ -82,7 +82,7 @@ bool ModeChoice::DescribesCurrentMode( PlayerNumber pn ) const
return false;
if( m_pCharacter && GAMESTATE->m_pCurCharacters[pn] != m_pCharacter )
return false;
if( m_CourseDifficulty != COURSE_DIFFICULTY_INVALID && GAMESTATE->m_CourseDifficulty != m_CourseDifficulty )
if( m_CourseDifficulty != COURSE_DIFFICULTY_INVALID && GAMESTATE->m_CourseDifficulty[pn] != m_CourseDifficulty )
return false;
return true;
@@ -289,7 +289,12 @@ void ModeChoice::Apply( PlayerNumber pn ) const
if( m_pCharacter )
GAMESTATE->m_pCurCharacters[pn] = m_pCharacter;
if( m_CourseDifficulty != COURSE_DIFFICULTY_INVALID )
GAMESTATE->m_CourseDifficulty = m_CourseDifficulty;
{
GAMESTATE->m_CourseDifficulty[pn] = m_CourseDifficulty;
if( PREFSMAN->m_bLockCourseDifficulties )
for( int p = 0; p < NUM_PLAYERS; ++p )
GAMESTATE->m_CourseDifficulty[p] = GAMESTATE->m_CourseDifficulty[pn];
}
// HACK: Set life type to BATTERY just once here so it happens once and
// we don't override the user's changes if they back out.