]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Campaign: make sure there's no countdown on map start; also disable player stats...
authorterencehill <piuntn@gmail.com>
Thu, 14 Apr 2022 13:01:10 +0000 (15:01 +0200)
committerterencehill <piuntn@gmail.com>
Thu, 14 Apr 2022 13:01:10 +0000 (15:01 +0200)
qcsrc/common/playerstats.qc
qcsrc/server/world.qc

index 6ffc506170a077d91b309fe7dd86a3afb1d7ba09..3e1444a35f9f28fcc98a16ed8553e042a1777d82 100644 (file)
@@ -40,8 +40,10 @@ void PlayerStats_GameReport_Reset_All()
        strfree(PS_GR_OUT_EVL);
 
        if (PS_GR_OUT_DB >= 0)
+       {
                db_close(PS_GR_OUT_DB);
-       PlayerStats_GameReport_Init();
+               PlayerStats_GameReport_Init();
+       }
        if(PS_GR_OUT_DB < 0)
                return;
 
index 9d4678ffd4814a04aed3a0185828e36dfbf8026a..1381a02abb7f41af1e57896b91a6a7425f52dcaf 100644 (file)
@@ -820,11 +820,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 +2145,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); });