qbsp: ignore leading path in texture names for Quake 2 compatibility
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
This commit is contained in:
parent
1196dd8a82
commit
f972f19f39
|
|
@ -75,8 +75,14 @@ AddAnimTex(const char *name)
|
|||
int
|
||||
FindMiptex(const char *name)
|
||||
{
|
||||
const char *pathsep;
|
||||
int i;
|
||||
|
||||
/* Ignore leading path in texture names (Q2 map compatibility) */
|
||||
pathsep = strrchr(name, '/');
|
||||
if (pathsep)
|
||||
name = pathsep + 1;
|
||||
|
||||
for (i = 0; i < map.nummiptex; i++) {
|
||||
if (!strcasecmp(name, map.miptex[i]))
|
||||
return i;
|
||||
|
|
|
|||
Loading…
Reference in New Issue