Move some player-specific data out of the bloated GameState class.
Have gameplay objects hold a PlayerState pointer instead of a PlayerNumber and indexing back into GameState. This will simplify off-screen players (e.g. CPU ghosts, network replicated human players, >2 players using one NoteField)
This commit is contained in:
@@ -23,6 +23,7 @@
|
||||
#include "CommonMetrics.h"
|
||||
#include "Game.h"
|
||||
#include "ScreenOptionsMasterPrefs.h"
|
||||
#include "PlayerState.h"
|
||||
|
||||
|
||||
#define LOGO_ON_COMMAND THEME->GetMetricA("ScreenTitleMenu","LogoOnCommand")
|
||||
@@ -362,7 +363,7 @@ void ScreenTitleMenu::HandleScreenMessage( const ScreenMessage SM )
|
||||
{
|
||||
// apply default options
|
||||
FOREACH_PlayerNumber( p )
|
||||
GAMESTATE->m_PlayerOptions[p].FromString( PREFSMAN->m_sDefaultModifiers );
|
||||
GAMESTATE->m_pPlayerState[p]->m_PlayerOptions.FromString( PREFSMAN->m_sDefaultModifiers );
|
||||
GAMESTATE->m_SongOptions.FromString( PREFSMAN->m_sDefaultModifiers );
|
||||
}
|
||||
m_aGameCommands[m_Choice].ApplyToAllPlayers();
|
||||
|
||||
Reference in New Issue
Block a user