From fce50f2f9c19b2fa507acb5878b317cdff5a20ce Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Mon, 21 Apr 2003 04:11:01 +0000 Subject: [PATCH] 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. --- stepmania/src/Player.cpp | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/stepmania/src/Player.cpp b/stepmania/src/Player.cpp index 4f79c0a780..961e564e64 100644 --- a/stepmania/src/Player.cpp +++ b/stepmania/src/Player.cpp @@ -576,12 +576,17 @@ void Player::HandleTapRowScore( unsigned row ) ASSERT(iNumTapsInRow > 0); -#ifndef DEBUG - // don't accumulate points if AutoPlay is on. - if( GAMESTATE->m_PlayerController[m_PlayerNumber] == CPU_AUTOPLAY && !GAMESTATE->m_bDemonstrationOrJukebox ) - return; + bool NoCheating = true; +#ifdef DEBUG + bool NoCheating = false; #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) m_pScoreKeeper->HandleTapRowScore(scoreOfLastTap, iNumTapsInRow, m_pInventory); @@ -597,12 +602,17 @@ void Player::HandleTapRowScore( unsigned row ) void Player::HandleHoldScore( HoldNoteScore holdScore, TapNoteScore tapScore ) { -#ifndef DEBUG - // don't accumulate points if AutoPlay is on. - if( GAMESTATE->m_PlayerController[m_PlayerNumber] == CPU_AUTOPLAY && !GAMESTATE->m_bDemonstrationOrJukebox ) - return; + bool NoCheating = true; +#ifdef DEBUG + bool NoCheating = false; #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) m_pScoreKeeper->HandleHoldScore(holdScore, tapScore);