diff options
-rw-r--r-- | src/qcommon/msg.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/qcommon/msg.c b/src/qcommon/msg.c index a0c17d73..b2377f1d 100644 --- a/src/qcommon/msg.c +++ b/src/qcommon/msg.c @@ -551,7 +551,7 @@ delta functions extern cvar_t *cl_shownet; -#define LOG(x) if( cl_shownet->integer == 4 ) { Com_Printf("%s ", x ); }; +#define LOG(x) if( cl_shownet && cl_shownet->integer == 4 ) { Com_Printf("%s ", x ); }; void MSG_WriteDelta( msg_t *msg, int oldV, int newV, int bits ) { if ( oldV == newV ) { @@ -1040,7 +1040,7 @@ void MSG_ReadDeltaEntity( msg_t *msg, entityState_t *from, entityState_t *to, if ( MSG_ReadBits( msg, 1 ) == 1 ) { Com_Memset( to, 0, sizeof( *to ) ); to->number = MAX_GENTITIES - 1; - if ( cl_shownet->integer >= 2 || cl_shownet->integer == -1 ) { + if ( cl_shownet && ( cl_shownet->integer >= 2 || cl_shownet->integer == -1 ) ) { Com_Printf( "%3i: #%-3i remove\n", msg->readcount, number ); } return; @@ -1062,7 +1062,7 @@ void MSG_ReadDeltaEntity( msg_t *msg, entityState_t *from, entityState_t *to, // shownet 2/3 will interleave with other printed info, -1 will // just print the delta records` - if ( cl_shownet->integer >= 2 || cl_shownet->integer == -1 ) { + if ( cl_shownet && ( cl_shownet->integer >= 2 || cl_shownet->integer == -1 ) ) { print = 1; Com_Printf( "%3i: #%-3i ", msg->readcount, to->number ); } else { @@ -1365,7 +1365,7 @@ void MSG_ReadDeltaPlayerstate (msg_t *msg, playerState_t *from, playerState_t *t // shownet 2/3 will interleave with other printed info, -2 will // just print the delta records - if ( cl_shownet->integer >= 2 || cl_shownet->integer == -2 ) { + if ( cl_shownet && ( cl_shownet->integer >= 2 || cl_shownet->integer == -2 ) ) { print = 1; Com_Printf( "%3i: playerstate ", msg->readcount ); } else { |