]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
fix Mod_BuildAliasSkinsFromSkinFiles to work with the new skin layout, this should...
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 13 May 2005 21:30:26 +0000 (21:30 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 13 May 2005 21:30:26 +0000 (21:30 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@5281 d7cf8633-e32d-0410-b094-e92efae38249

model_alias.c

index 15f97cba7addb5f2d8ac8b3f22f195aecafffaa6..ec9b64510c2d5828b76dc8aef90bd1d685c1a30f 100644 (file)
@@ -375,7 +375,8 @@ static void Mod_BuildAliasSkinsFromSkinFiles(texture_t *skin, skinfile_t *skinfi
        skinframe_t tempskinframe;
        if (skinfile)
        {
-               for (i = 0;skinfile;skinfile = skinfile->next, i++, skin++)
+               // the skin += loadmodel->num_surfaces part of this is because data_textures on alias models is arranged as [numskins][numsurfaces]
+               for (i = 0;skinfile;skinfile = skinfile->next, i++, skin += loadmodel->num_surfaces)
                {
                        memset(skin, 0, sizeof(*skin));
                        for (skinfileitem = skinfile->items;skinfileitem;skinfileitem = skinfileitem->next)