From: Mario Date: Mon, 10 Jan 2022 00:53:37 +0000 (+1000) Subject: Merge branch 'master' into Mario/q3compat_sanity X-Git-Tag: xonotic-v0.8.6~328^2~11 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=5e0031fc6e4c33eb8822d9d160526aef43495f4d;p=xonotic%2Fxonotic-data.pk3dir.git Merge branch 'master' into Mario/q3compat_sanity --- 5e0031fc6e4c33eb8822d9d160526aef43495f4d diff --cc qcsrc/server/world.qc index daaf43385,a438e633f..2733ce216 --- a/qcsrc/server/world.qc +++ b/qcsrc/server/world.qc @@@ -887,33 -887,8 +887,30 @@@ spawnfunc(worldspawn MapInfo_Enumerate(); MapInfo_FilterGametype(MapInfo_CurrentGametype(), MapInfo_CurrentFeatures(), MapInfo_RequiredFlags(), MapInfo_ForbiddenFlags(), 1); - if(fexists(_MapInfo_FindArenaFile(mapname, ".arena"))) - cvar_settemp("sv_q3acompat_machineshotgunswap", "1"); - - if(fexists(_MapInfo_FindArenaFile(mapname, ".defi"))) - cvar_settemp("sv_q3defragcompat", "1"); - q3compat = BITSET(q3compat, Q3COMPAT_ARENA, fexists(strcat("scripts/", mapname, ".arena"))); - q3compat = BITSET(q3compat, Q3COMPAT_DEFI, fexists(strcat("scripts/", mapname, ".defi"))); ++ q3compat = BITSET(q3compat, Q3COMPAT_ARENA, fexists(_MapInfo_FindArenaFile(mapname, ".arena"))); ++ q3compat = BITSET(q3compat, Q3COMPAT_DEFI, fexists(_MapInfo_FindArenaFile(mapname, ".defi"))); + + // quake 3 music support + if(world.music || world.noise) + { + // prefer .music over .noise + string chosen_music; + string oldstuff; + if(world.music) + chosen_music = world.music; + else + chosen_music = world.noise; + if( + substring(chosen_music, strlen(chosen_music) - 4, 4) == ".wav" + || + substring(chosen_music, strlen(chosen_music) - 4, 4) == ".ogg" + ) + oldstuff = strcat(clientstuff, "cd loop \"", chosen_music, "\"\n"); + else + oldstuff = strcat(clientstuff, "cd loop \"", chosen_music, "\"\n"); + + strcpy(clientstuff, oldstuff); + } if(whichpack(strcat("maps/", mapname, ".cfg")) != "") {