Okay, let's not have functional, oft-changing code inside #ifdef DEBUG.

This has broken three or four times since few people have time to test
compiling in both release and debug before committing.  Put a
check inside and do the logic outside.
This commit is contained in:
Glenn Maynard
2003-04-21 04:11:01 +00:00
parent 227343c9c3
commit fce50f2f9c
+18 -8
View File
@@ -576,12 +576,17 @@ void Player::HandleTapRowScore( unsigned row )
ASSERT(iNumTapsInRow > 0); ASSERT(iNumTapsInRow > 0);
#ifndef DEBUG bool NoCheating = true;
// don't accumulate points if AutoPlay is on. #ifdef DEBUG
if( GAMESTATE->m_PlayerController[m_PlayerNumber] == CPU_AUTOPLAY && !GAMESTATE->m_bDemonstrationOrJukebox ) bool NoCheating = false;
return;
#endif //DEBUG #endif //DEBUG
if(GAMESTATE->m_bDemonstrationOrJukebox)
NoCheating = false;
// don't accumulate points if AutoPlay is on.
if( NoCheating && GAMESTATE->m_PlayerController[m_PlayerNumber] == PC_CPU )
return;
if(m_pScoreKeeper) if(m_pScoreKeeper)
m_pScoreKeeper->HandleTapRowScore(scoreOfLastTap, iNumTapsInRow, m_pInventory); m_pScoreKeeper->HandleTapRowScore(scoreOfLastTap, iNumTapsInRow, m_pInventory);
@@ -597,12 +602,17 @@ void Player::HandleTapRowScore( unsigned row )
void Player::HandleHoldScore( HoldNoteScore holdScore, TapNoteScore tapScore ) void Player::HandleHoldScore( HoldNoteScore holdScore, TapNoteScore tapScore )
{ {
#ifndef DEBUG bool NoCheating = true;
// don't accumulate points if AutoPlay is on. #ifdef DEBUG
if( GAMESTATE->m_PlayerController[m_PlayerNumber] == CPU_AUTOPLAY && !GAMESTATE->m_bDemonstrationOrJukebox ) bool NoCheating = false;
return;
#endif //DEBUG #endif //DEBUG
if(GAMESTATE->m_bDemonstrationOrJukebox)
NoCheating = false;
// don't accumulate points if AutoPlay is on.
if( NoCheating && GAMESTATE->m_PlayerController[m_PlayerNumber] == PC_CPU )
return;
if(m_pScoreKeeper) if(m_pScoreKeeper)
m_pScoreKeeper->HandleHoldScore(holdScore, tapScore); m_pScoreKeeper->HandleHoldScore(holdScore, tapScore);