diff --git a/common/bspfile.h b/common/bspfile.h index 66d1cc9d..85ac0e57 100644 --- a/common/bspfile.h +++ b/common/bspfile.h @@ -74,7 +74,7 @@ BRUSH MODELS #define MAX_MAP_MARKSURFACES 524288 // can be increased without problems #else #define MAX_MAP_MODELS 768 // embedded models -#define MAX_MAP_ENTSTRING 0x80000 // 512 kB should be enough +#define MAX_MAP_ENTSTRING 0x100000 // 1 Mb should be enough #define MAX_MAP_PLANES 65536 // can be increased without problems #define MAX_MAP_NODES 32767 // because negative shorts are leafs #define MAX_MAP_CLIPNODES 32767 // because negative shorts are contents diff --git a/common/const.h b/common/const.h index 79d7ca5e..f0509971 100644 --- a/common/const.h +++ b/common/const.h @@ -123,6 +123,7 @@ // entity flags #define EFLAG_SLERP 1 // do studio interpolation of this entity +#define EFLAG_DOINTERP 128 // interpolation is ready // // temp entity events diff --git a/engine/client/cl_frame.c b/engine/client/cl_frame.c index 0012c80b..05ead83b 100644 --- a/engine/client/cl_frame.c +++ b/engine/client/cl_frame.c @@ -407,19 +407,15 @@ int CL_InterpolateModel( cl_entity_t *e ) VectorCopy( e->curstate.origin, e->origin ); VectorCopy( e->curstate.angles, e->angles ); - if( cls.timedemo || !e->model ) + if( cls.timedemo || !e->model || cl.maxclients <= 1 ) return 1; - if( fabs( cl_serverframetime() - cl_clientframetime()) < 0.0001f ) - return 1; // interpolation disabled - if( e->model->type == mod_brush && !cl_bmodelinterp->value ) return 1; if( cl.local.moving && cl.local.onground == e->index ) return 1; -// t = cl.time - cl_serverframetime(); t = cl.time - cl_interp->value; CL_FindInterpolationUpdates( e, t, &ph0, &ph1 ); @@ -1091,7 +1087,9 @@ void CL_LinkPacketEntities( frame_t *frame ) #ifdef STUDIO_INTERPOLATION_FIX if( ent->lastmove >= cl.time ) VectorCopy( ent->curstate.origin, ent->latched.prevorigin ); - ent->curstate.movetype = MOVETYPE_STEP; + if( FBitSet( host.features, ENGINE_COMPUTE_STUDIO_LERP )) + SetBits( ent->curstate.eflags, EFLAG_DOINTERP ); + else ent->curstate.movetype = MOVETYPE_STEP; #else if( ent->lastmove >= cl.time ) { @@ -1144,7 +1142,7 @@ void CL_LinkPacketEntities( frame_t *frame ) if( ent->model->type == mod_studio ) { - if( ent->curstate.movetype == MOVETYPE_STEP && FBitSet( host.features, ENGINE_COMPUTE_STUDIO_LERP )) + if( FBitSet( ent->curstate.eflags, EFLAG_DOINTERP ) && FBitSet( host.features, ENGINE_COMPUTE_STUDIO_LERP )) R_StudioLerpMovement( ent, cl.time, ent->origin, ent->angles ); } }