fix heretic2 like sprite path

This commit is contained in:
Denis Pauk 2023-05-24 00:27:53 +03:00
parent b3e90ada4f
commit bd4c07f6ea

View file

@ -1194,6 +1194,13 @@ Mod_LoadSP2 (const char *mod_name, const void *buffer, int modfilelen,
memcpy(sprout->frames[i].name, sprin->frames[i].name, MAX_SKINNAME);
skins[i] = find_image((char *)sprout->frames[i].name, it_sprite);
if (!skins[i])
{
/* heretic2 sprites have no "sprites/" prefix */
snprintf(sprout->frames[i].name, MAX_SKINNAME,
"sprites/%s", sprin->frames[i].name);
skins[i] = find_image(sprout->frames[i].name, it_sprite);
}
}
*type = mod_sprite;
@ -1298,7 +1305,9 @@ Mod_ReLoadSkins(struct image_s **skins, findimage_t find_image, void *extradata,
sprout = (dsprite_t *)extradata;
for (i=0 ; i<sprout->numframes ; i++)
skins[i] = find_image (sprout->frames[i].name, it_sprite);
{
skins[i] = find_image(sprout->frames[i].name, it_sprite);
}
return sprout->numframes;
}
else if (type == mod_alias)