From ae103b3de395159dfdb35c3410578d4586b4c64c Mon Sep 17 00:00:00 2001 From: Stefan Huehner Date: Fri, 1 Dec 2006 23:03:17 +0000 Subject: [PATCH] fix compilation without #define DEBUG, after r876 Some variables, functions used are only compiled in with DEBUG so the debugging-calls can only be used inside DEBUG git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@877 4a71c877-e1ca-e34f-864e-861f7616d084 --- src/move.c | 4 ++-- src/order.c | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/move.c b/src/move.c index 87f871433..3e9ee5951 100644 --- a/src/move.c +++ b/src/move.c @@ -1037,9 +1037,9 @@ static void moveCalcTurn(FRACT *pCurr, FRACT target, UDWORD rate) } - debug( LOG_NEVER, "path %d: diff %f\n", path, diff); - #ifdef DEBUG //Don't forget that if you don't define the variable, then we error out. + debug( LOG_NEVER, "path %d: diff %f\n", path, diff); + ASSERT( MAKEINT(*pCurr) < 360 && MAKEINT(*pCurr) >= 0, "moveCalcTurn: angle out of range - path %d\n" " NOTE - ANYONE WHO SEES THIS PLEASE REMEMBER: path %d", path, path ); diff --git a/src/order.c b/src/order.c index a6ad92f45..13978902b 100644 --- a/src/order.c +++ b/src/order.c @@ -3876,7 +3876,9 @@ BOOL secondarySetState(DROID *psDroid, SECONDARY_ORDER sec, SECONDARY_STATE Stat case DSO_ASSIGN_PRODUCTION: case DSO_ASSIGN_CYBORG_PRODUCTION: case DSO_ASSIGN_VTOL_PRODUCTION: +#ifdef DEBUG debug( LOG_NEVER, "order factories %s\n", secondaryPrintFactories(State)); +#endif if ( sec == DSO_ASSIGN_PRODUCTION) { prodType = REF_FACTORY; @@ -3941,7 +3943,9 @@ BOOL secondarySetState(DROID *psDroid, SECONDARY_ORDER sec, SECONDARY_STATE Stat CurrState &= ~DSS_ASSPROD_VTOL_MASK; } CurrState |= (State & DSS_ASSPROD_MASK); +#ifdef DEBUG debug( LOG_NEVER, "final factories %s\n", secondaryPrintFactories(CurrState)); +#endif } break;