From: z411 Date: Sun, 6 Sep 2020 21:26:45 +0000 (-0300) Subject: Improved Freeze Tag X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=1ce401f295e23306a592f00abe3df5ac198fe372;p=xonotic%2Fxonotic-data.pk3dir.git Improved Freeze Tag --- diff --git a/qcsrc/common/gamemodes/gamemode/freezetag/sv_freezetag.qc b/qcsrc/common/gamemodes/gamemode/freezetag/sv_freezetag.qc index 360dc7a4e..02a34c800 100644 --- a/qcsrc/common/gamemodes/gamemode/freezetag/sv_freezetag.qc +++ b/qcsrc/common/gamemodes/gamemode/freezetag/sv_freezetag.qc @@ -111,11 +111,14 @@ bool freezetag_CheckWinner() { Send_Notification(NOTIF_ALL, NULL, MSG_CENTER, CENTER_ROUND_OVER); Send_Notification(NOTIF_ALL, NULL, MSG_INFO, INFO_ROUND_OVER); + Send_Notification(NOTIF_ALL, NULL, MSG_ANNCE, ANNCE_ROUND_OVER); + FOREACH_CLIENT(IS_PLAYER(it), { it.freezetag_frozen_timeout = 0; nades_Clear(it); }); - game_stopped = true; + if(autocvar_g_freezetag_round_stop) + game_stopped = true; round_handler_Init(5, autocvar_g_freezetag_warmup, autocvar_g_freezetag_round_timelimit); return true; } @@ -128,14 +131,16 @@ bool freezetag_CheckWinner() int winner_team = freezetag_getWinnerTeam(); if(winner_team > 0) { - Send_Notification(NOTIF_ALL, NULL, MSG_CENTER, APP_TEAM_NUM(winner_team, CENTER_ROUND_TEAM_WIN)); - Send_Notification(NOTIF_ALL, NULL, MSG_INFO, APP_TEAM_NUM(winner_team, INFO_ROUND_TEAM_WIN)); + Send_Notification(NOTIF_ALL, NULL, MSG_CENTER, APP_TEAM_NUM(winner_team, CENTER_ROUND_TEAM_SCORES)); + Send_Notification(NOTIF_ALL, NULL, MSG_INFO, APP_TEAM_NUM(winner_team, INFO_ROUND_TEAM_SCORES)); + Send_Notification(NOTIF_ALL, NULL, MSG_ANNCE, APP_TEAM_NUM(winner_team, ANNCE_ROUND_TEAM_WIN)); TeamScore_AddToTeam(winner_team, ST_FT_ROUNDS, +1); } else if(winner_team == -1) { Send_Notification(NOTIF_ALL, NULL, MSG_CENTER, CENTER_ROUND_TIED); Send_Notification(NOTIF_ALL, NULL, MSG_INFO, INFO_ROUND_TIED); + Send_Notification(NOTIF_ALL, NULL, MSG_ANNCE, ANNCE_ROUND_TIED); } FOREACH_CLIENT(IS_PLAYER(it), { @@ -143,7 +148,8 @@ bool freezetag_CheckWinner() nades_Clear(it); }); - game_stopped = true; + if(autocvar_g_freezetag_round_stop) + game_stopped = true; round_handler_Init(5, autocvar_g_freezetag_warmup, autocvar_g_freezetag_round_timelimit); return true; } @@ -436,8 +442,12 @@ MUTATOR_HOOKFUNCTION(ft, reset_map_players) { FOREACH_CLIENT(IS_PLAYER(it), { CS(it).killcount = 0; - it.freezetag_frozen_timeout = -1; - PutClientInServer(it); + + if(autocvar_g_freezetag_round_respawn) { + it.freezetag_frozen_timeout = -1; + PutClientInServer(it); + } + it.freezetag_frozen_timeout = 0; }); freezetag_count_alive_players(); @@ -454,6 +464,12 @@ MUTATOR_HOOKFUNCTION(ft, Unfreeze) { entity targ = M_ARGV(0, entity); targ.freezetag_frozen_time = 0; + + if(autocvar_g_freezetag_revive_respawn) { + targ.freezetag_frozen_timeout = -1; + PutClientInServer(targ); + } + targ.freezetag_frozen_timeout = 0; } diff --git a/qcsrc/common/gamemodes/gamemode/freezetag/sv_freezetag.qh b/qcsrc/common/gamemodes/gamemode/freezetag/sv_freezetag.qh index b77318ca2..91e783c78 100644 --- a/qcsrc/common/gamemodes/gamemode/freezetag/sv_freezetag.qh +++ b/qcsrc/common/gamemodes/gamemode/freezetag/sv_freezetag.qh @@ -8,6 +8,9 @@ int autocvar_g_freezetag_point_leadlimit; bool autocvar_g_freezetag_team_spawns; string autocvar_g_freezetag_weaponarena = "most_available"; +bool autocvar_g_freezetag_round_respawn; +bool autocvar_g_freezetag_round_stop; + const int ST_FT_ROUNDS = 1; void freezetag_Initialize(); @@ -37,3 +40,4 @@ float autocvar_g_freezetag_revive_extra_size; float autocvar_g_freezetag_revive_speed; bool autocvar_g_freezetag_revive_nade; float autocvar_g_freezetag_revive_nade_health; +bool autocvar_g_freezetag_revive_respawn; diff --git a/qcsrc/common/notifications/all.inc b/qcsrc/common/notifications/all.inc index d9f2428d6..f4298eeb0 100644 --- a/qcsrc/common/notifications/all.inc +++ b/qcsrc/common/notifications/all.inc @@ -221,6 +221,10 @@ MSG_ANNCE_NOTIF(ROUND_TEAM_WIN_BLUE, N__ALWAYS, "round_win_blue", CH_INFO, VOL_BASEVOICE, ATTEN_NONE) MSG_ANNCE_NOTIF(ROUND_TEAM_WIN_YELLOW, N__ALWAYS, "round_win_yellow", CH_INFO, VOL_BASEVOICE, ATTEN_NONE) MSG_ANNCE_NOTIF(ROUND_TEAM_WIN_PINK, N__ALWAYS, "round_win_pink", CH_INFO, VOL_BASEVOICE, ATTEN_NONE) + MSG_ANNCE_NOTIF(ROUND_TEAM_SCORES_RED, N__ALWAYS, "scores_red", CH_INFO, VOL_BASEVOICE, ATTEN_NONE) + MSG_ANNCE_NOTIF(ROUND_TEAM_SCORES_BLUE, N__ALWAYS, "scores_blue", CH_INFO, VOL_BASEVOICE, ATTEN_NONE) + MSG_ANNCE_NOTIF(ROUND_TEAM_SCORES_YELLOW, N__ALWAYS, "scores_yellow", CH_INFO, VOL_BASEVOICE, ATTEN_NONE) + MSG_ANNCE_NOTIF(ROUND_TEAM_SCORES_PINK, N__ALWAYS, "scores_pink", CH_INFO, VOL_BASEVOICE, ATTEN_NONE) MSG_ANNCE_NOTIF(ROUND_OVER, N__ALWAYS, "round_over", CH_INFO, VOL_BASEVOICE, ATTEN_NONE) MSG_ANNCE_NOTIF(ROUND_TIED, N__ALWAYS, "round_tied", CH_INFO, VOL_BASEVOICE, ATTEN_NONE) MSG_ANNCE_NOTIF(ALONE, N__ALWAYS, "alone", CH_INFO, VOL_BASEVOICE, ATTEN_NONE) @@ -378,6 +382,7 @@ string multiteam_info_sprintf(string input, string teamname) { return ((input != MSG_INFO_NOTIF(FREEZETAG_SELF, N_CONSOLE, 1, 0, "s1", "", "", _("^BG%s^K1 froze themself"), "") MULTITEAM_INFO(ROUND_TEAM_WIN, N_CONSOLE, 0, 0, "", "", "", _("^TC^TT^BG team wins the round"), "", NAME) + MULTITEAM_INFO(ROUND_TEAM_SCORES, N_CONSOLE, 0, 0, "", "", "", _("^TC^TT^BG scores"), "", NAME) MSG_INFO_NOTIF(ROUND_PLAYER_WIN, N_CONSOLE, 1, 0, "s1", "", "", _("^BG%s^BG wins the round"), "") MSG_INFO_NOTIF(ROUND_TIED, N_CONSOLE, 0, 0, "", "", "", _("^BGRound tied"), "") MSG_INFO_NOTIF(ROUND_OVER, N_CONSOLE, 0, 0, "", "", "", _("^BGRound over, there's no winner"), "") @@ -693,6 +698,7 @@ string multiteam_info_sprintf(string input, string teamname) { return ((input != MULTITEAM_CENTER(ROUND_TEAM_LOSS, N_ENABLE, 0, 0, "", CPID_ROUND, "0 0", _("^TC^TT^BG team loses the round"), "", NAME) MULTITEAM_CENTER(ROUND_TEAM_WIN, N_ENABLE, 0, 0, "", CPID_ROUND, "0 0", _("^TC^TT^BG team wins the round"), "", NAME) + MULTITEAM_CENTER(ROUND_TEAM_SCORES, N_ENABLE, 0, 0, "", CPID_ROUND, "0 0", _("^TC^TT^BG scores"), "", NAME) MSG_CENTER_NOTIF(ROUND_PLAYER_WIN, N_ENABLE, 1, 0, "s1", CPID_ROUND, "0 0", _("^BG%s^BG wins the round"), "") MSG_CENTER_NOTIF(FREEZETAG_SELF, N_ENABLE, 0, 0, "", CPID_Null, "0 0", _("^K1You froze yourself"), "")