Load from wad files only when there isn't already a fallback. This reduces confusion over textures with the same name.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5909 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
f810be4830
commit
0c41ac0b7d
1 changed files with 12 additions and 9 deletions
|
@ -14124,16 +14124,19 @@ static void Image_LoadHiResTextureWorker(void *ctx, void *data, size_t a, size_t
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//now look in wad files and swap over the fallback. (halflife compatability)
|
if (!tex->fallbackdata)
|
||||||
COM_StripExtension(tex->ident, fname, sizeof(fname));
|
|
||||||
buf = W_GetTexture(fname, &imgwidth, &imgheight, &format);
|
|
||||||
if (buf)
|
|
||||||
{
|
{
|
||||||
BZ_Free(tex->fallbackdata);
|
//now look in wad files and swap over the fallback. (halflife compatability)
|
||||||
tex->fallbackdata = buf;
|
COM_StripExtension(tex->ident, fname, sizeof(fname));
|
||||||
tex->fallbackfmt = format;
|
buf = W_GetTexture(fname, &imgwidth, &imgheight, &format);
|
||||||
tex->fallbackwidth = imgwidth;
|
if (buf)
|
||||||
tex->fallbackheight = imgheight;
|
{
|
||||||
|
BZ_Free(tex->fallbackdata);
|
||||||
|
tex->fallbackdata = buf;
|
||||||
|
tex->fallbackfmt = format;
|
||||||
|
tex->fallbackwidth = imgwidth;
|
||||||
|
tex->fallbackheight = imgheight;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tex->fallbackdata)
|
if (tex->fallbackdata)
|
||||||
|
|
Loading…
Reference in a new issue