when logging state transitions, don't unless there's a change

This commit is contained in:
ehouse 2006-09-02 05:29:59 +00:00
parent 16519a2070
commit 6b527014c8

View file

@ -163,9 +163,11 @@ getStateStr( XW_State st )
static void
logNewState( XW_State old, XW_State newst )
{
char* oldStr = getStateStr(old);
char* newStr = getStateStr(newst);
XP_LOGF( "state transition %s => %s", oldStr, newStr );
if ( old != newst ) {
char* oldStr = getStateStr(old);
char* newStr = getStateStr(newst);
XP_LOGF( "state transition %s => %s", oldStr, newStr );
}
}
# define SETSTATE( s, st ) { XW_State old = (s)->nv.gameState; \
(s)->nv.gameState = (st); \