diff --git a/qbsp/map.c b/qbsp/map.c index 52e0592d..57438e89 100644 --- a/qbsp/map.c +++ b/qbsp/map.c @@ -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;