add checkpoints to catch input assert
This commit is contained in:
@@ -611,6 +611,7 @@ void InputMapper::GameToMenu( const GameInput &GameI, MenuInput &MenuI )
|
||||
|
||||
void InputMapper::StyleToGame( const StyleInput &StyleI, GameInput &GameI )
|
||||
{
|
||||
CHECKPOINT_M( ssprintf("%i %i", StyleI.player, StyleI.col) );
|
||||
const Style* pStyle = GAMESTATE->GetCurrentStyle();
|
||||
GameI = pStyle->StyleInputToGameInput( StyleI );
|
||||
}
|
||||
@@ -650,6 +651,7 @@ bool InputMapper::IsButtonDown( const MenuInput &MenuI )
|
||||
|
||||
bool InputMapper::IsButtonDown( const StyleInput &StyleI )
|
||||
{
|
||||
CHECKPOINT_M( ssprintf("%i %i", StyleI.player, StyleI.col) );
|
||||
GameInput GameI;
|
||||
StyleToGame( StyleI, GameI );
|
||||
return IsButtonDown( GameI );
|
||||
|
||||
@@ -529,6 +529,7 @@ void Player::Update( float fDeltaTime )
|
||||
|
||||
CHECKPOINT_M( ssprintf("P%i, %i %i", pn, col, iNumCols) );
|
||||
const StyleInput StyleI( pn, col );
|
||||
CHECKPOINT_M( ssprintf("P%i %i", StyleI.player, StyleI.col) );
|
||||
bool bIsHoldingButton = INPUTMAPPER->IsButtonDown( StyleI );
|
||||
// TODO: Make this work for non-human-controlled players
|
||||
if( bIsHoldingButton && !GAMESTATE->m_bDemonstrationOrJukebox && m_pPlayerState->m_PlayerController==PC_HUMAN )
|
||||
|
||||
@@ -40,8 +40,8 @@ void Style::GetTransformedNoteDataForStyle( PlayerNumber pn, const NoteData& ori
|
||||
|
||||
GameInput Style::StyleInputToGameInput( const StyleInput& StyleI ) const
|
||||
{
|
||||
ASSERT_M( StyleI.player < NUM_PLAYERS, ssprintf("P%i", StyleI.player) );
|
||||
ASSERT_M( StyleI.col < MAX_COLS_PER_PLAYER, ssprintf("C%i", StyleI.col) );
|
||||
ASSERT_M( StyleI.player < NUM_PLAYERS && StyleI.col < MAX_COLS_PER_PLAYER,
|
||||
ssprintf("P%i C%i", StyleI.player, StyleI.col) );
|
||||
|
||||
FOREACH_GameController(gc)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user