Merge branch 'bones_was_here/showspec' into 'master'
authorbones_was_here <bones_was_here@xa.org.au>
Mon, 18 Apr 2022 13:51:26 +0000 (13:51 +0000)
committerbones_was_here <bones_was_here@xa.org.au>
Mon, 18 Apr 2022 13:51:26 +0000 (13:51 +0000)
Implement sv_showspectators 2: Only spectators can see the spectators list

See merge request xonotic/xonotic-data.pk3dir!1010

1  2 
qcsrc/server/world.qc

diff --combined qcsrc/server/world.qc
index 1381a02abb7f41af1e57896b91a6a7425f52dcaf,69eefdc5cdbe76e5a025a5e57e8dfdf2abbd7228..fca7c1741497e7a092245ad376744a1b3e4b630a
@@@ -495,6 -495,7 +495,7 @@@ void cvar_changes_init(
                BADCVAR("sv_motd");
                BADCVAR("sv_public");
                BADCVAR("sv_showfps");
+               BADCVAR("sv_showspectators");
                BADCVAR("sv_status_privacy");
                BADCVAR("sv_taunt");
                BADCVAR("sv_vote_call");
@@@ -820,11 -821,11 +821,11 @@@ spawnfunc(worldspawn
  
        if(autocvar_g_campaign)
                CampaignPreInit();
 +      else
 +              PlayerStats_GameReport_Init(); // we need this to be initiated before InitGameplayMode
  
        Map_MarkAsRecent(mapname);
  
 -      PlayerStats_GameReport_Init(); // we need this to be initiated before InitGameplayMode
 -
        InitGameplayMode();
        static_init_late();
        static_init_precache();
@@@ -2145,7 -2146,7 +2146,7 @@@ void readlevelcvars(
  
      MUTATOR_CALLHOOK(ReadLevelCvars);
  
 -      if (!warmup_stage)
 +      if (!warmup_stage && !autocvar_g_campaign)
                game_starttime = time + cvar("g_start_delay");
  
        FOREACH(Weapons, it != WEP_Null, { it.wr_init(it); });