From: Mario Date: Thu, 16 Jul 2020 14:25:59 +0000 (+1000) Subject: Disable the use .arena and .defi files in mapinfo generation by default until it... X-Git-Tag: xonotic-v0.8.6~328^2~23 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=8af36fe36bfa41c17c9bd337ebca430add66957c;p=xonotic%2Fxonotic-data.pk3dir.git Disable the use .arena and .defi files in mapinfo generation by default until it is more complete --- diff --git a/qcsrc/common/mapinfo.qc b/qcsrc/common/mapinfo.qc index 1a0310218..23de32c7c 100644 --- a/qcsrc/common/mapinfo.qc +++ b/qcsrc/common/mapinfo.qc @@ -10,6 +10,7 @@ #endif bool autocvar_g_mapinfo_arena_compat = true; +bool autocvar_g_mapinfo_arena_generate = false; #ifdef MENUQC #define WARN_COND false @@ -301,20 +302,23 @@ float _MapInfo_Generate(string pFilename) // 0: failure, 1: ok ent, 2: ok bsp mapMins = '0 0 0'; mapMaxs = '0 0 0'; - // try for a .arena or .defi file if no .mapinfo exists - bool isdefi = false; - string arena_fn = _MapInfo_FindArenaFile(pFilename, ".arena"); - int arena_fh = fopen(arena_fn, FILE_READ); - if(arena_fh < 0) + if(autocvar_g_mapinfo_arena_generate) { - isdefi = true; - arena_fn = _MapInfo_FindArenaFile(pFilename, ".defi"); - arena_fh = fopen(arena_fn, FILE_READ); - } - if(arena_fh >= 0) - { - _MapInfo_ParseArena(arena_fn, arena_fh, pFilename, NULL, isdefi, true); - fclose(arena_fh); + // try for .arena or .defi files, as they may have more accurate information + bool isdefi = false; + string arena_fn = _MapInfo_FindArenaFile(pFilename, ".arena"); + int arena_fh = fopen(arena_fn, FILE_READ); + if(arena_fh < 0) + { + isdefi = true; + arena_fn = _MapInfo_FindArenaFile(pFilename, ".defi"); + arena_fh = fopen(arena_fn, FILE_READ); + } + if(arena_fh >= 0) + { + _MapInfo_ParseArena(arena_fn, arena_fh, pFilename, NULL, isdefi, true); + fclose(arena_fh); + } } for (;;) diff --git a/xonotic-common.cfg b/xonotic-common.cfg index a0c4b679e..fbdf838ee 100644 --- a/xonotic-common.cfg +++ b/xonotic-common.cfg @@ -150,7 +150,8 @@ set debug_deglobalization_clear 0 "make the new wrappers set globals to NaN afte // disabling until it's complete set prvm_garbagecollection_enable 0 -set g_mapinfo_arena_compat 1 "allow mapinfo data to be pulled directly from .arena and .defi files if they exist, rather than generating .mapinfo files based on their contents" +set g_mapinfo_arena_compat 1 "allow mapinfo data to be pulled directly from .arena and .defi files if they exist, rather than generating .mapinfo files for them" +set g_mapinfo_arena_generate 0 "allow mapinfo data to be pulled from .arena and .defi files during generation" // load console command aliases and settings exec commands.cfg