diff options
author | Andrey Nazarov <skuller@skuller.net> | 2012-12-18 16:30:43 +0400 |
---|---|---|
committer | Andrey Nazarov <skuller@skuller.net> | 2012-12-18 16:30:43 +0400 |
commit | ff910131d9002120cfe2c6483eb40d1408fdd8ea (patch) | |
tree | 1167f2fb403abc86e36873b0dd0b43cf09a578e1 | |
parent | 11e4df599371b21f50fb5c57317fc993bde4083d (diff) |
Fix extra player state bits debug display.
-rw-r--r-- | inc/common/msg.h | 2 | ||||
-rw-r--r-- | src/client/parse.c | 6 | ||||
-rw-r--r-- | src/common/msg.c | 7 |
3 files changed, 5 insertions, 10 deletions
diff --git a/inc/common/msg.h b/inc/common/msg.h index 5950875..998c3bd 100644 --- a/inc/common/msg.h +++ b/inc/common/msg.h @@ -149,7 +149,7 @@ void MSG_ParseDeltaPlayerstate_Packet(const player_state_t *from, player_stat #ifdef _DEBUG #if USE_CLIENT void MSG_ShowDeltaPlayerstateBits_Default(int flags); -void MSG_ShowDeltaPlayerstateBits_Enhanced(int flags); +void MSG_ShowDeltaPlayerstateBits_Enhanced(int flags, int extraflags); void MSG_ShowDeltaUsercmdBits_Enhanced(int bits); #endif #if USE_CLIENT || USE_MVD_CLIENT diff --git a/src/client/parse.c b/src/client/parse.c index dc2000c..bbff5c7 100644 --- a/src/client/parse.c +++ b/src/client/parse.c @@ -313,8 +313,8 @@ static void CL_ParseFrame(int extrabits) if (cls.serverProtocol > PROTOCOL_VERSION_DEFAULT) { MSG_ParseDeltaPlayerstate_Enhanced(from, &frame.ps, bits, extraflags); #ifdef _DEBUG - if (cl_shownet->integer > 2) { - MSG_ShowDeltaPlayerstateBits_Enhanced(bits); + if (cl_shownet->integer > 2 && (bits || extraflags)) { + MSG_ShowDeltaPlayerstateBits_Enhanced(bits, extraflags); Com_LPrintf(PRINT_DEVELOPER, "\n"); } #endif @@ -331,7 +331,7 @@ static void CL_ParseFrame(int extrabits) } else { MSG_ParseDeltaPlayerstate_Default(from, &frame.ps, bits); #ifdef _DEBUG - if (cl_shownet->integer > 2) { + if (cl_shownet->integer > 2 && bits) { MSG_ShowDeltaPlayerstateBits_Default(bits); Com_LPrintf(PRINT_DEVELOPER, "\n"); } diff --git a/src/common/msg.c b/src/common/msg.c index b4d267d..c7cfc1e 100644 --- a/src/common/msg.c +++ b/src/common/msg.c @@ -2396,13 +2396,8 @@ void MSG_ShowDeltaPlayerstateBits_Default(int flags) #undef S } -void MSG_ShowDeltaPlayerstateBits_Enhanced(int flags) +void MSG_ShowDeltaPlayerstateBits_Enhanced(int flags, int extraflags) { - int extraflags; - - extraflags = flags >> PS_BITS; - flags &= PS_MASK; - #define SP(b,s) if(flags&PS_##b) SHOWBITS(s) #define SE(b,s) if(extraflags&EPS_##b) SHOWBITS(s) SP(M_TYPE, "pmove.pm_type"); |