1
0
mirror of https://github.com/YGGverse/xash3d-fwgs.git synced 2025-03-13 06:21:08 +00:00

utils: mdldec: smd.c: prevent division by zero.

This commit is contained in:
Andrey Akhmichin 2023-12-14 14:57:00 +05:00 committed by Alibek Omarov
parent 93ceb0e4ed
commit 845cee2578

@ -440,9 +440,12 @@ static void WriteFrameInfo( FILE *fp, mstudioanim_t *anim, mstudioseqdesc_t *seq
if( bone->parent == -1 )
{
scale = frame / (float)( seqdesc->numframes - 1 );
if( seqdesc->numframes > 1 && frame > 0 )
{
scale = frame / (float)( seqdesc->numframes - 1 );
VectorMA( motion, scale, seqdesc->linearmovement, motion );
VectorMA( motion, scale, seqdesc->linearmovement, motion );
}
ProperBoneRotationZ( motion, 270.0f );
}