]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/round_handler.qc
Campaign: don't start the first round until player joined the game
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / round_handler.qc
index ad0fcaae66278f5a93a47b76f76603874e6deda2..8cc3295b9a5d4acfe8d59a7f77585e115a30ccf3 100644 (file)
@@ -1,5 +1,6 @@
 #include "round_handler.qh"
 
+#include "campaign.qh"
 #include "command/vote.qh"
 #include "../common/util.qh"
 
@@ -28,7 +29,7 @@ void round_handler_Think(entity this)
 
        if (this.cnt > 0)  // countdown running
        {
-               if (this.canRoundStart())
+               if (this.canRoundStart() && !(autocvar_g_campaign && !campaign_bots_may_start))
                {
                        if (this.cnt == this.count + 1) round_starttime = time + this.count;
                        int f = this.cnt - 1;
@@ -111,6 +112,6 @@ void round_handler_Reset(float next_think)
 
 void round_handler_Remove()
 {
-       remove(round_handler);
-       round_handler = world;
+       delete(round_handler);
+       round_handler = NULL;
 }