Map between PlayerNumber and PlayerInfo. Most subclasses use a one to one mapping so that's what ScreenGameplay's version will do. If you need other behavior, implement this member function.
This commit is contained in:
@@ -2199,7 +2199,10 @@ void ScreenGameplay::Input( const InputEventPlus &input )
|
||||
AbortGiveUp( true );
|
||||
|
||||
if( PREFSMAN->m_AutoPlay == PC_HUMAN )
|
||||
m_vPlayerInfo[input.StyleI.player].m_pPlayer->Step( input.StyleI.col, input.DeviceI.ts );
|
||||
{
|
||||
PlayerInfo& pi = PlayerNumberToPlayerInfo( input.StyleI.player );
|
||||
pi.m_pPlayer->Step( input.StyleI.col, input.DeviceI.ts );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -221,6 +221,7 @@ protected:
|
||||
|
||||
vector<PlayerInfo> m_vPlayerInfo; // filled by SGameplay derivatives in Init
|
||||
virtual void FillPlayerInfo( vector<PlayerInfo> &vPlayerInfoOut ) = 0;
|
||||
virtual PlayerInfo &PlayerNumberToPlayerInfo( PlayerNumber pn ) { return m_vPlayerInfo[pn]; }
|
||||
};
|
||||
|
||||
vector<PlayerInfo>::iterator GetNextEnabledPlayerInfo ( vector<PlayerInfo>::iterator iter, vector<PlayerInfo> &v );
|
||||
|
||||
Reference in New Issue
Block a user