mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 15:22:04 +00:00
QuakeForge now supports map specific textures in textures/mapname/
.
This commit is contained in:
parent
d93fceea38
commit
e3ea39e67b
1 changed files with 24 additions and 14 deletions
|
@ -84,21 +84,31 @@ Mod_LoadExternalTextures (model_t *mod)
|
|||
if (!tx)
|
||||
continue;
|
||||
|
||||
// replace special flag characters with underscores
|
||||
if (tx->name[0] == '*') { // FIXME: translate to # or _?
|
||||
filename = va ("maps/#%s.tga", tx->name + 1);
|
||||
} else {
|
||||
filename = va ("maps/%s.tga", tx->name);
|
||||
}
|
||||
QFS_FOpenFile (filename, &f);
|
||||
|
||||
if (!f) {
|
||||
if (tx->name[0] == '*') {
|
||||
filename = va ("textures/#%s.tga", tx->name + 1);
|
||||
} else {
|
||||
filename = va ("textures/%s.tga", tx->name);
|
||||
}
|
||||
// FIXME: replace special flag characters with # or _?
|
||||
if (tx->name[0] == '*') {
|
||||
filename = va ("textures/%.*s/#%s.tga", strlen (mod->name + 5) - 4,
|
||||
mod->name + 5, tx->name + 1);
|
||||
QFS_FOpenFile (filename, &f);
|
||||
if (!f) {
|
||||
filename = va ("textures/#%s.tga", tx->name + 1);
|
||||
QFS_FOpenFile (filename, &f);
|
||||
}
|
||||
if (!f) {
|
||||
filename = va ("maps/#%s.tga", tx->name + 1);
|
||||
QFS_FOpenFile (filename, &f);
|
||||
}
|
||||
} else {
|
||||
filename = va ("textures/%.*s/%s.tga", strlen (mod->name +5) -4,
|
||||
mod->name + 5, tx->name);
|
||||
QFS_FOpenFile (filename, &f);
|
||||
if (!f) {
|
||||
filename = va ("textures/%s.tga", tx->name);
|
||||
QFS_FOpenFile (filename, &f);
|
||||
}
|
||||
if (!f) {
|
||||
filename = va ("maps/%s.tga", tx->name);
|
||||
QFS_FOpenFile (filename, &f);
|
||||
}
|
||||
}
|
||||
|
||||
if (f) {
|
||||
|
|
Loading…
Reference in a new issue