Added alternate replacement texture names for compatability. (as requested by rjlan)

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@1351 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2005-09-22 12:59:34 +00:00
parent b7318bfaf4
commit c86db94c76

View file

@ -2761,9 +2761,25 @@ void * GLMod_LoadSpriteFrame (void * pin, mspriteframe_t **ppframe, int framenum
pspriteframe->left = origin[0]; pspriteframe->left = origin[0];
pspriteframe->right = width + origin[0]; pspriteframe->right = width + origin[0];
pspriteframe->gl_texturenum = 0;
if (!pspriteframe->gl_texturenum)
{ //the dp way
strcat(name, va("_%i", framenum));
pspriteframe->gl_texturenum = Mod_LoadReplacementTexture(name, "sprites", true, true, true);
}
if (!pspriteframe->gl_texturenum)
{ //the older fte way.
COM_StripExtension(loadmodel->name, name); COM_StripExtension(loadmodel->name, name);
strcat(name, va("_%i", framenum)); strcat(name, va("_%i", framenum));
pspriteframe->gl_texturenum = Mod_LoadReplacementTexture(name, "sprites", true, true, true); pspriteframe->gl_texturenum = Mod_LoadReplacementTexture(name, "sprites", true, true, true);
}
if (!pspriteframe->gl_texturenum)
{ //the fuhquake way
COM_StripExtension(COM_SkipPath(loadmodel->name), name);
strcat(name, va("_%i", framenum));
pspriteframe->gl_texturenum = Mod_LoadReplacementTexture(name, "sprites", true, true, true);
}
if (version == SPRITE32_VERSION) if (version == SPRITE32_VERSION)
{ {