From 4b6bf1d931d9e6e21b55dffb492e0f77e4316e60 Mon Sep 17 00:00:00 2001 From: Jacker Date: Thu, 18 Dec 2014 21:31:56 +0200 Subject: [PATCH] minor fix to update checking, refs #32 --- src/client/cl_main.c | 8 +++++--- src/qcommon/q_shared.h | 4 ++++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/client/cl_main.c b/src/client/cl_main.c index 089c16437d..6e02a96371 100644 --- a/src/client/cl_main.c +++ b/src/client/cl_main.c @@ -762,13 +762,15 @@ void CL_RequestMotd(void) void CL_RequestMasterData(qboolean force) { - if (!force && autoupdate.masterDataChecked > 0 && cls.realtime - autoupdate.masterDataChecked < 300000) + int tempTime = cls.realtime - autoupdate.masterDataChecked; + + //Only check when we are not running a game + if (cls.state >= CA_LOADING) { return; } - //Only check when we are not running a game - if (cls.state >= CA_LOADING) + if (!force && autoupdate.masterDataChecked && tempTime < 300000 && tempTime > 0) { return; } diff --git a/src/qcommon/q_shared.h b/src/qcommon/q_shared.h index 8e57e77d1f..56f0e18412 100644 --- a/src/qcommon/q_shared.h +++ b/src/qcommon/q_shared.h @@ -402,6 +402,10 @@ typedef int clipHandle_t; #define BIT(x) (1 << x) #endif +#define ENABLEBIT(x, y) x |= BIT(y) +#define CLEARBIT(x, y) x &= ~BIT(y) +#define TOGGLEBIT(x, y) x ^= BIT(y) + //#define SND_NORMAL 0x000 // (default) Allow sound to be cut off only by the same sound on this channel #define SND_OKTOCUT 0x001 // Allow sound to be cut off by any following sounds on this channel #define SND_REQUESTCUT 0x002 // Allow sound to be cut off by following sounds on this channel only for sounds who request cutoff