13 Sep 2018
This commit is contained in:
parent
12af8403ca
commit
7cf8d1688b
|
@ -74,7 +74,7 @@ BRUSH MODELS
|
||||||
#define MAX_MAP_MARKSURFACES 524288 // can be increased without problems
|
#define MAX_MAP_MARKSURFACES 524288 // can be increased without problems
|
||||||
#else
|
#else
|
||||||
#define MAX_MAP_MODELS 768 // embedded models
|
#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_PLANES 65536 // can be increased without problems
|
||||||
#define MAX_MAP_NODES 32767 // because negative shorts are leafs
|
#define MAX_MAP_NODES 32767 // because negative shorts are leafs
|
||||||
#define MAX_MAP_CLIPNODES 32767 // because negative shorts are contents
|
#define MAX_MAP_CLIPNODES 32767 // because negative shorts are contents
|
||||||
|
|
|
@ -123,6 +123,7 @@
|
||||||
|
|
||||||
// entity flags
|
// entity flags
|
||||||
#define EFLAG_SLERP 1 // do studio interpolation of this entity
|
#define EFLAG_SLERP 1 // do studio interpolation of this entity
|
||||||
|
#define EFLAG_DOINTERP 128 // interpolation is ready
|
||||||
|
|
||||||
//
|
//
|
||||||
// temp entity events
|
// temp entity events
|
||||||
|
|
|
@ -407,19 +407,15 @@ int CL_InterpolateModel( cl_entity_t *e )
|
||||||
VectorCopy( e->curstate.origin, e->origin );
|
VectorCopy( e->curstate.origin, e->origin );
|
||||||
VectorCopy( e->curstate.angles, e->angles );
|
VectorCopy( e->curstate.angles, e->angles );
|
||||||
|
|
||||||
if( cls.timedemo || !e->model )
|
if( cls.timedemo || !e->model || cl.maxclients <= 1 )
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
if( fabs( cl_serverframetime() - cl_clientframetime()) < 0.0001f )
|
|
||||||
return 1; // interpolation disabled
|
|
||||||
|
|
||||||
if( e->model->type == mod_brush && !cl_bmodelinterp->value )
|
if( e->model->type == mod_brush && !cl_bmodelinterp->value )
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
if( cl.local.moving && cl.local.onground == e->index )
|
if( cl.local.moving && cl.local.onground == e->index )
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
// t = cl.time - cl_serverframetime();
|
|
||||||
t = cl.time - cl_interp->value;
|
t = cl.time - cl_interp->value;
|
||||||
CL_FindInterpolationUpdates( e, t, &ph0, &ph1 );
|
CL_FindInterpolationUpdates( e, t, &ph0, &ph1 );
|
||||||
|
|
||||||
|
@ -1091,7 +1087,9 @@ void CL_LinkPacketEntities( frame_t *frame )
|
||||||
#ifdef STUDIO_INTERPOLATION_FIX
|
#ifdef STUDIO_INTERPOLATION_FIX
|
||||||
if( ent->lastmove >= cl.time )
|
if( ent->lastmove >= cl.time )
|
||||||
VectorCopy( ent->curstate.origin, ent->latched.prevorigin );
|
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
|
#else
|
||||||
if( ent->lastmove >= cl.time )
|
if( ent->lastmove >= cl.time )
|
||||||
{
|
{
|
||||||
|
@ -1144,7 +1142,7 @@ void CL_LinkPacketEntities( frame_t *frame )
|
||||||
|
|
||||||
if( ent->model->type == mod_studio )
|
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 );
|
R_StudioLerpMovement( ent, cl.time, ent->origin, ent->angles );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Reference in New Issue