From 505b6cc264900c0ff971e35897cc19908da05e93 Mon Sep 17 00:00:00 2001 From: Andrey Akhmichin <15944199+nekonomicon@users.noreply.github.com> Date: Thu, 29 Feb 2024 05:57:15 +0500 Subject: [PATCH] utils: mdldec: boneweights fix. --- utils/mdldec/qc.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/utils/mdldec/qc.c b/utils/mdldec/qc.c index bf78af70..78fbdfd9 100644 --- a/utils/mdldec/qc.c +++ b/utils/mdldec/qc.c @@ -601,6 +601,12 @@ void WriteQCScript( void ) fputs( "$scale 1.0\n", fp ); fputs( "\n", fp ); + if( model_hdr->flags & STUDIO_HAS_BONEINFO ) + { + if( model_hdr->flags & STUDIO_HAS_BONEWEIGHTS ) + fputs( "$boneweights\n\n", fp ); + } + WriteBodyGroupInfo( fp ); fprintf( fp, "$flags %u\n\n", model_hdr->flags &~( STUDIO_HAS_BONEINFO | STUDIO_HAS_BONEWEIGHTS ) ); @@ -611,10 +617,6 @@ void WriteQCScript( void ) WriteSkinFamilyInfo( fp ); WriteTextureRenderMode( fp ); - - if( model_hdr->flags & ( STUDIO_HAS_BONEINFO | STUDIO_HAS_BONEWEIGHTS ) ) - fputs( "$boneweights\n\n", fp ); - WriteAttachmentInfo( fp ); fprintf( fp, "$bbox %f %f %f", model_hdr->min[0], model_hdr->min[1], model_hdr->min[2] );