From 4548ceb0f47f419181f36405a902132a1cffdbc2 Mon Sep 17 00:00:00 2001 From: Jbleezy Date: Thu, 28 Dec 2023 18:57:48 -0800 Subject: [PATCH] Search & Rezurrect: add ally down and ally revived messages --- english/localizedstrings/reimagined.str | 6 +++ scripts/zm/zgrief/zgrief_reimagined.gsc | 65 +++++++------------------ 2 files changed, 24 insertions(+), 47 deletions(-) diff --git a/english/localizedstrings/reimagined.str b/english/localizedstrings/reimagined.str index a1e4179e..2aa4b359 100644 --- a/english/localizedstrings/reimagined.str +++ b/english/localizedstrings/reimagined.str @@ -168,6 +168,12 @@ LANG_ENGLISH "Enemy Down! [&&1 Remaining]" REFERENCE ZOMBIE_ZGRIEF_PLAYER_REVIVED LANG_ENGLISH "Enemy Revived! [&&1 Remaining]" +REFERENCE ZOMBIE_ZGRIEF_ALLY_BLED_OUT +LANG_ENGLISH "Ally Down! [&&1 Remaining]" + +REFERENCE ZOMBIE_ZGRIEF_ALLY_REVIVED +LANG_ENGLISH "Ally Revived! [&&1 Remaining]" + REFERENCE ZOMBIE_ZGRIEF_PLAYER_DEAD LANG_ENGLISH "Enemy Bled Out! [&&1 Remaining]" diff --git a/scripts/zm/zgrief/zgrief_reimagined.gsc b/scripts/zm/zgrief/zgrief_reimagined.gsc index c3b82b0e..309dd0b0 100644 --- a/scripts/zm/zgrief/zgrief_reimagined.gsc +++ b/scripts/zm/zgrief/zgrief_reimagined.gsc @@ -1258,6 +1258,14 @@ update_players_on_downed(excluded_player) } } + if (other_players_remaining > 0) + { + foreach (player in players) + { + player thread show_grief_hud_msg(&"ZOMBIE_ZGRIEF_ALLY_BLED_OUT", players_remaining, 30); + } + } + if (players_remaining == 1) { foreach (player in players) @@ -1299,8 +1307,10 @@ update_players_on_revived(revived_player, reviver) { team = revived_player.team; other_team = getOtherTeam(team); + players = get_players(team); other_players = get_players(other_team); players_remaining = get_number_of_valid_players_team(team); + other_players_remaining = get_number_of_valid_players_team(other_team); grief_score_hud_set_player_count(team, players_remaining); @@ -1308,6 +1318,14 @@ update_players_on_revived(revived_player, reviver) { player thread show_grief_hud_msg(&"ZOMBIE_ZGRIEF_PLAYER_REVIVED", players_remaining); } + + if (other_players_remaining > 0) + { + foreach (player in players) + { + player thread show_grief_hud_msg(&"ZOMBIE_ZGRIEF_ALLY_REVIVED", players_remaining, 30); + } + } } update_players_on_disconnect(excluded_player) @@ -2284,53 +2302,6 @@ grief_laststand_weapons_return() return 1; } -sudden_death() -{ - level endon("end_game"); - - if (level.scr_zm_ui_gametype_obj != "zsnr") - { - return; - } - - level.sudden_death = 0; - - while (1) - { - level waittill("restart_round_start"); - - level.sudden_death = 0; - - time = level waittill_notify_or_timeout("restart_round", 300); - - if (!isDefined(time)) - { - continue; - } - - level.sudden_death = 1; - - players = get_players(); - - foreach (player in players) - { - player thread show_grief_hud_msg("Sudden Death!"); - player thread show_grief_hud_msg("Lose 100 Health!", undefined, 30, 1); - player thread red_flashing_overlay_loop(); - - health = player.health; - player setMaxHealth(player.maxhealth - 100); - - if (player.health > health) - { - player.health = health; - } - - player.premaxhealth -= 100; - } - } -} - red_flashing_overlay_loop() { level endon("restart_round");