diff options
author | Andrey Nazarov <skuller@skuller.net> | 2008-06-29 12:32:32 +0000 |
---|---|---|
committer | Andrey Nazarov <skuller@skuller.net> | 2008-06-29 12:32:32 +0000 |
commit | e826e5f176f21cd18b3bbc22887a266835ada57c (patch) | |
tree | d25a84a84f9168b16a77fe4ed8b169c9611bbb02 /source/cl_ents.c | |
parent | 491f1c100e860c45a5d2aa358d58f777cd1cf895 (diff) |
Added client and server side support for 32-bit solids.
New R1Q2 and Q2PRO minor protocol versions, 1905 and 1014.
Use environment variables for game and server features negotiation.
Relax restrictions on quake paths when searching inside pak files.
Made OSS subsystem cvar names consistent with core sound system conventions.
Misc latched cvar handling changes.
Diffstat (limited to 'source/cl_ents.c')
-rw-r--r-- | source/cl_ents.c | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/source/cl_ents.c b/source/cl_ents.c index 2dc8c46..7f63640 100644 --- a/source/cl_ents.c +++ b/source/cl_ents.c @@ -45,9 +45,28 @@ static void CL_SetEntityState( entity_state_t *state ) { if( state->number == cl.frame.clientNum + 1 ) { VectorCopy( cl.playerEntityOrigin, state->origin ); VectorCopy( cl.playerEntityAngles, state->angles ); - } + } else if( state->solid ) { + cl.solidEntities[cl.numSolidEntities++] = ent; + if( state->solid != 31 ) { + int x, zd, zu; + + // encoded bbox + if( LONG_SOLID_SUPPORTED( cls.serverProtocol, cls.protocolVersion ) ) { + x = (state->solid & 255); + zd = ((state->solid>>8) & 255); + zu = ((state->solid>>16) & 65535) - 32768; + } else { + x = 8*(state->solid & 31); + zd = 8*((state->solid>>5) & 31); + zu = 8*((state->solid>>10) & 63) - 32; + } - ent = &cl_entities[state->number]; + ent->mins[0] = ent->mins[1] = -x; + ent->maxs[0] = ent->maxs[1] = x; + ent->mins[2] = -zd; + ent->maxs[2] = zu; + } + } if( ent->serverframe != cl.oldframe.number ) { // wasn't in last update, so initialize some things @@ -101,7 +120,7 @@ void CL_DeltaFrame( void ) { VectorScale( cl.frame.ps.pmove.origin, 0.125f, cl.playerEntityOrigin ); - CL_BuildSolidList(); + cl.numSolidEntities = 0; for( i = 0; i < cl.frame.numEntities; i++ ) { j = ( cl.frame.firstEntity + i ) & PARSE_ENTITIES_MASK; |