|
|
|
@ -178,7 +178,7 @@ static void R_StudioSetupTimings( void )
@@ -178,7 +178,7 @@ static void R_StudioSetupTimings( void )
|
|
|
|
|
{ |
|
|
|
|
// synchronize with server time
|
|
|
|
|
g_studio.time = gpGlobals->time; |
|
|
|
|
g_studio.frametime = gpGlobals->time - gpGlobals->oldtime; |
|
|
|
|
g_studio.frametime = gpGlobals->time - gpGlobals->oldtime; |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
@ -626,14 +626,14 @@ StudioEstimateFrame
@@ -626,14 +626,14 @@ StudioEstimateFrame
|
|
|
|
|
|
|
|
|
|
==================== |
|
|
|
|
*/ |
|
|
|
|
float R_StudioEstimateFrame( cl_entity_t *e, mstudioseqdesc_t *pseqdesc ) |
|
|
|
|
float R_StudioEstimateFrame( cl_entity_t *e, mstudioseqdesc_t *pseqdesc, double time ) |
|
|
|
|
{ |
|
|
|
|
double dfdt, f; |
|
|
|
|
|
|
|
|
|
if( g_studio.interpolate ) |
|
|
|
|
{ |
|
|
|
|
if( g_studio.time < e->curstate.animtime ) dfdt = 0.0; |
|
|
|
|
else dfdt = (g_studio.time - e->curstate.animtime) * e->curstate.framerate * pseqdesc->fps; |
|
|
|
|
if( time < e->curstate.animtime ) dfdt = 0.0; |
|
|
|
|
else dfdt = (time - e->curstate.animtime) * e->curstate.framerate * pseqdesc->fps; |
|
|
|
|
} |
|
|
|
|
else dfdt = 0; |
|
|
|
|
|
|
|
|
@ -883,7 +883,7 @@ void R_StudioMergeBones( cl_entity_t *e, model_t *m_pSubModel )
@@ -883,7 +883,7 @@ void R_StudioMergeBones( cl_entity_t *e, model_t *m_pSubModel )
|
|
|
|
|
|
|
|
|
|
pseqdesc = (mstudioseqdesc_t *)((byte *)m_pStudioHeader + m_pStudioHeader->seqindex) + e->curstate.sequence; |
|
|
|
|
|
|
|
|
|
f = R_StudioEstimateFrame( e, pseqdesc ); |
|
|
|
|
f = R_StudioEstimateFrame( e, pseqdesc, g_studio.time ); |
|
|
|
|
|
|
|
|
|
panim = gEngfuncs.R_StudioGetAnim( m_pStudioHeader, m_pSubModel, pseqdesc ); |
|
|
|
|
R_StudioCalcRotations( e, pos, q, pseqdesc, panim, f ); |
|
|
|
@ -949,7 +949,7 @@ void R_StudioSetupBones( cl_entity_t *e )
@@ -949,7 +949,7 @@ void R_StudioSetupBones( cl_entity_t *e )
|
|
|
|
|
|
|
|
|
|
pseqdesc = (mstudioseqdesc_t *)((byte *)m_pStudioHeader + m_pStudioHeader->seqindex) + e->curstate.sequence; |
|
|
|
|
|
|
|
|
|
f = R_StudioEstimateFrame( e, pseqdesc ); |
|
|
|
|
f = R_StudioEstimateFrame( e, pseqdesc, g_studio.time ); |
|
|
|
|
|
|
|
|
|
panim = gEngfuncs.R_StudioGetAnim( m_pStudioHeader, RI.currentmodel, pseqdesc ); |
|
|
|
|
R_StudioCalcRotations( e, pos, q, pseqdesc, panim, f ); |
|
|
|
@ -2789,7 +2789,7 @@ static void R_StudioClientEvents( void )
@@ -2789,7 +2789,7 @@ static void R_StudioClientEvents( void )
|
|
|
|
|
if( pseqdesc->numevents == 0 ) |
|
|
|
|
return; |
|
|
|
|
|
|
|
|
|
end = R_StudioEstimateFrame( e, pseqdesc ); |
|
|
|
|
end = R_StudioEstimateFrame( e, pseqdesc, g_studio.time ); |
|
|
|
|
start = end - e->curstate.framerate * gpGlobals->frametime * pseqdesc->fps; |
|
|
|
|
pevent = (mstudioevent_t *)((byte *)m_pStudioHeader + pseqdesc->eventindex); |
|
|
|
|
|
|
|
|
|