mirror of
https://github.com/YGGverse/xash3d-fwgs.git
synced 2025-01-19 19:40:21 +00:00
engine: client: fix comparing floats in interpolation code
This commit is contained in:
parent
d4d39c66fb
commit
f0783ddee1
@ -406,7 +406,7 @@ void CL_PureOrigin( cl_entity_t *ent, float t, vec3_t outorigin, vec3_t outangle
|
||||
|
||||
VectorSubtract( ph0->origin, ph1->origin, delta );
|
||||
|
||||
if( t0 != t1 )
|
||||
if( !Q_equal( t0, t1 ))
|
||||
frac = ( t - t1 ) / ( t0 - t1 );
|
||||
else frac = 1.0f;
|
||||
|
||||
@ -486,7 +486,7 @@ int CL_InterpolateModel( cl_entity_t *e )
|
||||
return 0;
|
||||
}
|
||||
|
||||
if( t2 == t1 )
|
||||
if( Q_equal( t2, t1 ))
|
||||
{
|
||||
VectorCopy( ph0->origin, e->origin );
|
||||
VectorCopy( ph0->angles, e->angles );
|
||||
|
Loading…
x
Reference in New Issue
Block a user