diff options
author | /dev/humancontroller <devhc@example.com> | 2015-03-27 14:17:55 +0100 |
---|---|---|
committer | /dev/humancontroller <devhc@example.com> | 2017-03-09 13:51:07 +0100 |
commit | 3c08da6086d5c2431dd929543ed89afb79956423 (patch) | |
tree | 3725431d788e0abfcd78dd4457822bfefeab5716 /src/server | |
parent | ef4057c1551351ceff9a1378795b2fb8fb929200 (diff) |
implement the entity 64-bit client-masking extension
rename the previously unused entityShared_t::s to hack, and make use of it
TODO: remove the said field, and add and use ``int hiMask'' instead
Diffstat (limited to 'src/server')
-rw-r--r-- | src/server/sv_init.c | 3 | ||||
-rw-r--r-- | src/server/sv_snapshot.c | 11 |
2 files changed, 10 insertions, 4 deletions
diff --git a/src/server/sv_init.c b/src/server/sv_init.c index 9934fa7e..380a117e 100644 --- a/src/server/sv_init.c +++ b/src/server/sv_init.c @@ -498,6 +498,9 @@ void SV_SpawnServer( char *server, qboolean killBots ) { sv.checksumFeed = ( ((int) rand() << 16) ^ rand() ) ^ Com_Milliseconds(); FS_Restart( sv.checksumFeed ); + // advertise GPP-compatible extensions + Cvar_Set( "sv_gppExtension", "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 58136388..57d4e64b 100644 --- a/src/server/sv_snapshot.c +++ b/src/server/sv_snapshot.c @@ -349,10 +349,13 @@ 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) - Com_Error( ERR_DROP, "SVF_CLIENTMASK: clientNum >= 32" ); - if (~ent->r.singleClient & (1 << frame->ps.clientNum)) - continue; + if ( frame->ps.clientNum >= 32 ) { + if ( ~ent->r.hack.generic1 & ( 1 << ( frame->ps.clientNum - 32 ) ) ) + continue; + } else { + if ( ~ent->r.singleClient & ( 1 << frame->ps.clientNum ) ) + continue; + } } svEnt = SV_SvEntityForGentity( ent ); |