From: Mario Date: Thu, 9 Jan 2020 11:08:35 +0000 (+1000) Subject: Automatically detect .defi files and enable VQ3 compat at match start, not while... X-Git-Tag: xonotic-v0.8.5~1105^2~31 X-Git-Url: https://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=commitdiff_plain;h=fd79a13b917512605c6748e82a018587e2f754a2 Automatically detect .defi files and enable VQ3 compat at match start, not while generating the .mapinfo file --- diff --git a/qcsrc/common/mapinfo.qc b/qcsrc/common/mapinfo.qc index 1d6f4897b..3bb04b369 100644 --- a/qcsrc/common/mapinfo.qc +++ b/qcsrc/common/mapinfo.qc @@ -846,9 +846,6 @@ float MapInfo_Get_ByName_NoFallbacks(string pFilename, int pAllowGenerate, Gamet if(fexists(strcat("scripts/", pFilename, ".arena"))) fputs(fh, "settemp_for_type all sv_q3acompat_machineshotgunswap 1\n"); - if(fexists(strcat("scripts/", pFilename, ".defi"))) - fputs(fh, "settemp_for_type all sv_vq3compat 1\n"); - fputs(fh, "// optional: fog density red green blue alpha mindist maxdist\n"); fputs(fh, "// optional: settemp_for_type (all|gametypename) cvarname value\n"); fputs(fh, "// optional: clientsettemp_for_type (all|gametypename) cvarname value\n"); diff --git a/qcsrc/server/g_world.qc b/qcsrc/server/g_world.qc index f739533fc..80ecd2a31 100644 --- a/qcsrc/server/g_world.qc +++ b/qcsrc/server/g_world.qc @@ -872,6 +872,9 @@ spawnfunc(worldspawn) MapInfo_Enumerate(); MapInfo_FilterGametype(MapInfo_CurrentGametype(), MapInfo_CurrentFeatures(), MapInfo_RequiredFlags(), MapInfo_ForbiddenFlags(), 1); + if(fexists(strcat("scripts/", mapname, ".defi"))) + cvar_settemp("sv_vq3compat", "1"); + if(whichpack(strcat("maps/", mapname, ".cfg")) != "") { int fd = fopen(strcat("maps/", mapname, ".cfg"), FILE_READ);