commit 8c8efe8970c08426df73d7739bfe7a7b9f56517d Author: devhc Date: Wed Jul 13 07:56:56 2011 +0200 alter the 64-bit clientmask functionality for compatibility readd the removed entityShared_t::s field (as entityShared_t::compat) to retain compatibility use the new field for 64-bit clientmask support diff --git a/src/game/g_public.h b/src/game/g_public.h index 3b53a37..bfa18ec 100644 --- a/src/game/g_public.h +++ b/src/game/g_public.h @@ -33,7 +33,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #define SVF_CLIENTMASK 0x00000002 // send to clients specified by these bitmasks: // entityShared_t->singleClient: low-order bits (0..31) - // entityShared_t->hiMask: high-order bits (32..63) + // entityShared_t->compat.generic1: high-order bits (32..63) #define SVF_BROADCAST 0x00000020 // send to all connected clients #define SVF_PORTAL 0x00000040 // merge a second pvs at origin2 into snapshots @@ -51,12 +51,14 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA typedef struct { + entityState_t compat; // exists to retain compatibility (primarily as a + // struct pad, but can be used for other hacks) + qboolean linked; // qfalse if not in any good cluster int linkcount; int svFlags; // SVF_NOCLIENT, SVF_BROADCAST, etc int singleClient; // only send to this client when SVF_SINGLECLIENT is set - int hiMask; // singleClient and hiMask are bitmasks if SVF_CLIENTMASK is set qboolean bmodel; // if false, assume an explicit mins / maxs bounding box // only set by trap_SetBrushModel diff --git a/src/server/sv_init.c b/src/server/sv_init.c index e84ff0f..232554e 100644 --- a/src/server/sv_init.c +++ b/src/server/sv_init.c @@ -503,6 +503,9 @@ void SV_SpawnServer( char *server, qboolean killBots ) { sv.checksumFeed = ( ((int) rand() << 16) ^ rand() ) ^ Com_Milliseconds(); FS_Restart( sv.checksumFeed ); + // compatibility hack: advertise functionality support + Cvar_Set( "sv_gppCompat", "1" ); + CM_LoadMap( va("maps/%s.bsp", server), qfalse, &checksum ); // set serverinfo visible name diff --git a/src/server/sv_snapshot.c b/src/server/sv_snapshot.c index 09cc0c3..776e462 100644 --- a/src/server/sv_snapshot.c +++ b/src/server/sv_snapshot.c @@ -351,7 +351,7 @@ static void SV_AddEntitiesVisibleFromPoint( vec3_t origin, clientSnapshot_t *fra // entities can be flagged to be sent to a given mask of clients if ( ent->r.svFlags & SVF_CLIENTMASK ) { if ( frame->ps.clientNum >= 32 ) { - if ( ~ent->r.hiMask & ( 1 << ( frame->ps.clientNum - 32 ) ) ) + if ( ~ent->r.compat.generic1 & ( 1 << ( frame->ps.clientNum - 32 ) ) ) continue; } else { if ( ~ent->r.singleClient & ( 1 << frame->ps.clientNum ) )