From c86db94c7666babae4e878aff84b3eb30e8fd974 Mon Sep 17 00:00:00 2001 From: Spoike Date: Thu, 22 Sep 2005 12:59:34 +0000 Subject: [PATCH] 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 --- engine/gl/gl_model.c | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/engine/gl/gl_model.c b/engine/gl/gl_model.c index cf427da76..2ac7a4896 100644 --- a/engine/gl/gl_model.c +++ b/engine/gl/gl_model.c @@ -2761,9 +2761,25 @@ void * GLMod_LoadSpriteFrame (void * pin, mspriteframe_t **ppframe, int framenum pspriteframe->left = origin[0]; pspriteframe->right = width + origin[0]; - COM_StripExtension(loadmodel->name, name); - strcat(name, va("_%i", framenum)); - pspriteframe->gl_texturenum = Mod_LoadReplacementTexture(name, "sprites", true, true, true); + 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); + strcat(name, va("_%i", framenum)); + 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) {