]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
modeldecompile: detect skeletal models properly (no more crash on exporting MD3s)
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 11 Mar 2009 13:11:59 +0000 (13:11 +0000)
committerdivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 11 Mar 2009 13:11:59 +0000 (13:11 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@8797 d7cf8633-e32d-0410-b094-e92efae38249

model_shared.c

index 524b3e73d2fb896ef86baa7ff7168331669b2502..6d16dc964efab1acc49ecb32fcf6de0a03b27263 100644 (file)
@@ -2545,7 +2545,7 @@ static void Mod_Decompile_f(void)
        }
 
        // export SMD if possible (only for skeletal models)
-       if (mod->surfmesh.num_triangles && mod->num_poses)
+       if (mod->surfmesh.num_triangles && mod->num_bones)
        {
                dpsnprintf(outname, sizeof(outname), "%s_decompiled/ref1.smd", basename);
                Mod_Decompile_SMD(mod, outname, 0, 1, true);