eliminate InputMapper dependency on GameState. GameState

now tells InputMapper if it should join players.
This commit is contained in:
Glenn Maynard
2006-09-30 22:29:03 +00:00
parent 95c768b6e5
commit ecef158b06
3 changed files with 27 additions and 13 deletions
+7
View File
@@ -853,6 +853,13 @@ const Style* GameState::GetCurrentStyle() const
void GameState::SetCurrentStyle( const Style *pStyle )
{
m_pCurStyle.Set( pStyle );
if( INPUTMAPPER )
{
if( GetCurrentStyle() && GetCurrentStyle()->m_StyleType == ONE_PLAYER_TWO_SIDES )
INPUTMAPPER->SetJoinControllers( m_MasterPlayerNumber );
else
INPUTMAPPER->SetJoinControllers( PLAYER_INVALID );
}
}
bool GameState::IsPlayerEnabled( PlayerNumber pn ) const