Move game_stopped setting to game modes that want it
authorterencehill <piuntn@gmail.com>
Mon, 9 Jan 2017 18:42:17 +0000 (19:42 +0100)
committerterencehill <piuntn@gmail.com>
Mon, 9 Jan 2017 18:42:17 +0000 (19:42 +0100)
qcsrc/common/gamemodes/gamemode/onslaught/sv_onslaught.qc
qcsrc/server/mutators/mutator/gamemode_ca.qc
qcsrc/server/mutators/mutator/gamemode_domination.qc
qcsrc/server/mutators/mutator/gamemode_freezetag.qc
qcsrc/server/round_handler.qc

index 5d67f9d..877a8d0 100644 (file)
@@ -1195,6 +1195,7 @@ bool Onslaught_CheckWinner()
                nades_Clear(it);
        });
 
+       game_stopped = true;
        return 1;
 }
 
index 44c9d15..e8dcdfe 100644 (file)
@@ -58,9 +58,11 @@ float CA_CheckWinner()
        {
                Send_Notification(NOTIF_ALL, NULL, MSG_CENTER, CENTER_ROUND_OVER);
                Send_Notification(NOTIF_ALL, NULL, MSG_INFO, INFO_ROUND_OVER);
+               FOREACH_CLIENT(IS_PLAYER(it), LAMBDA(nades_Clear(it)));
+
                allowed_to_spawn = false;
+               game_stopped = true;
                round_handler_Init(5, autocvar_g_ca_warmup, autocvar_g_ca_round_timelimit);
-               FOREACH_CLIENT(IS_PLAYER(it), LAMBDA(nades_Clear(it)));
                return 1;
        }
 
@@ -82,6 +84,7 @@ float CA_CheckWinner()
        }
 
        allowed_to_spawn = false;
+       game_stopped = true;
        round_handler_Init(5, autocvar_g_ca_warmup, autocvar_g_ca_round_timelimit);
 
        FOREACH_CLIENT(IS_PLAYER(it), LAMBDA(nades_Clear(it)));
index ee9bdfa..c236ab8 100644 (file)
@@ -342,6 +342,8 @@ float Domination_CheckWinner()
        {
                Send_Notification(NOTIF_ALL, NULL, MSG_CENTER, CENTER_ROUND_OVER);
                Send_Notification(NOTIF_ALL, NULL, MSG_INFO, INFO_ROUND_OVER);
+
+               game_stopped = true;
                round_handler_Init(5, autocvar_g_domination_warmup, autocvar_g_domination_round_timelimit);
                return 1;
        }
@@ -365,6 +367,7 @@ float Domination_CheckWinner()
                Send_Notification(NOTIF_ALL, NULL, MSG_INFO, INFO_ROUND_TIED);
        }
 
+       game_stopped = true;
        round_handler_Init(5, autocvar_g_domination_warmup, autocvar_g_domination_round_timelimit);
 
        return 1;
index 69f55a3..2310ab4 100644 (file)
@@ -110,6 +110,7 @@ float freezetag_CheckWinner()
                        it.freezetag_frozen_timeout = 0;
                        nades_Clear(it);
                ));
+               game_stopped = true;
                round_handler_Init(5, autocvar_g_freezetag_warmup, autocvar_g_freezetag_round_timelimit);
                return 1;
        }
@@ -134,6 +135,8 @@ float freezetag_CheckWinner()
                it.freezetag_frozen_timeout = 0;
                nades_Clear(it);
        ));
+
+       game_stopped = true;
        round_handler_Init(5, autocvar_g_freezetag_warmup, autocvar_g_freezetag_round_timelimit);
        return 1;
 }
index fc2c44e..786635a 100644 (file)
@@ -58,7 +58,6 @@ void round_handler_Think(entity this)
                        // schedule a new round
                        this.wait = true;
                        this.nextthink = time + this.delay;
-                       //game_stopped = true; // not all modes actually pause during round intermission
                }
                else
                {