]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge branch 'master' into Mario/q3compat_sanity
authorMario <mario.mario@y7mail.com>
Mon, 10 Jan 2022 00:53:37 +0000 (10:53 +1000)
committerMario <mario.mario@y7mail.com>
Mon, 10 Jan 2022 00:53:37 +0000 (10:53 +1000)
1  2 
qcsrc/server/command/sv_cmd.qc
qcsrc/server/world.qc
qcsrc/server/world.qh
xonotic-common.cfg

Simple merge
index daaf43385eede73f776edd570f11777f0c823dfa,a438e633f61a71f7f47e89bd95bd6c93fe72f58b..2733ce216c82c183875742e4b92c4e11ece2314c
@@@ -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")) != "")
        {
Simple merge
Simple merge