vk: load map patches without extra .bsp extension
e.g. `c1a0d.patch`, not `c1a0d.bsp.patch` Ref: #578
This commit is contained in:
parent
e26ce740f1
commit
e8a09c85e5
|
@ -699,7 +699,22 @@ static void parsePatches( const model_t *const map ) {
|
||||||
g_patch.surfaces_count = 0;
|
g_patch.surfaces_count = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
Q_snprintf(filename, sizeof(filename), "luchiki/%s.patch", map->name);
|
{
|
||||||
|
const char *ext = NULL;
|
||||||
|
|
||||||
|
// Find extension (if any)
|
||||||
|
{
|
||||||
|
const char *p = map->name;
|
||||||
|
for(; *p; ++p)
|
||||||
|
if (*p == '.')
|
||||||
|
ext = p;
|
||||||
|
if (!ext)
|
||||||
|
ext = p;
|
||||||
|
}
|
||||||
|
|
||||||
|
Q_snprintf(filename, sizeof(filename), "luchiki/%.*s.patch", (int)(ext - map->name), map->name);
|
||||||
|
}
|
||||||
|
|
||||||
DEBUG("Loading patches from file \"%s\"", filename);
|
DEBUG("Loading patches from file \"%s\"", filename);
|
||||||
data = gEngine.fsapi->LoadFile( filename, 0, false );
|
data = gEngine.fsapi->LoadFile( filename, 0, false );
|
||||||
if (!data) {
|
if (!data) {
|
||||||
|
|
Loading…
Reference in New Issue