1
0
mirror of https://github.com/JezuzLizard/BO2-Reimagined.git synced 2025-06-08 06:12:17 -05:00

Containment and Meat: remove most HUD messages

Meat: add dropped the meat obituary message
Meat: optimize meat obituary messages
This commit is contained in:
Jbleezy 2023-12-30 19:05:33 -08:00
parent 9062db8f51
commit b50a5ba78e
4 changed files with 42 additions and 92 deletions

View File

@ -213,6 +213,12 @@ LANG_ENGLISH "^8&&1 grabbed the meat"
REFERENCE ZOMBIE_GRABBED_MEAT_ENEMY REFERENCE ZOMBIE_GRABBED_MEAT_ENEMY
LANG_ENGLISH "^9&&1 grabbed the meat" LANG_ENGLISH "^9&&1 grabbed the meat"
REFERENCE ZOMBIE_DROPPED_MEAT
LANG_ENGLISH "^8&&1 dropped the meat"
REFERENCE ZOMBIE_DROPPED_MEAT_ENEMY
LANG_ENGLISH "^9&&1 dropped the meat"
REFERENCE ZOMBIE_HAS_MEAT REFERENCE ZOMBIE_HAS_MEAT
LANG_ENGLISH "^8&&1 has the meat stink" LANG_ENGLISH "^8&&1 has the meat stink"

View File

@ -123,6 +123,13 @@ meat_bounce_override(pos, normal, ent, bounce)
{ {
self hide(); self hide();
players = get_players();
foreach (player in players)
{
player thread print_meat_msg(self.owner, "dropped");
}
if (level.scr_zm_ui_gametype_obj == "zmeat") if (level.scr_zm_ui_gametype_obj == "zmeat")
{ {
level.meat_powerup = maps\mp\zombies\_zm_powerups::specific_powerup_drop("meat_stink", pos); level.meat_powerup = maps\mp\zombies\_zm_powerups::specific_powerup_drop("meat_stink", pos);
@ -140,7 +147,7 @@ meat_bounce_override(pos, normal, ent, bounce)
self delete(); self delete();
} }
meat_stink(who) meat_stink(who, owner)
{ {
if (who hasWeapon(level.item_meat_name)) if (who hasWeapon(level.item_meat_name))
{ {
@ -149,19 +156,22 @@ meat_stink(who)
if (!is_player_valid(who)) if (!is_player_valid(who))
{ {
if (isDefined(owner))
{
players = get_players();
foreach (player in players)
{
player thread print_meat_msg(owner, "dropped");
}
}
if (level.scr_zm_ui_gametype_obj == "zmeat") if (level.scr_zm_ui_gametype_obj == "zmeat")
{ {
valid_drop = scripts\zm\replaced\_zm_utility::check_point_in_life_brush(who.origin) || (check_point_in_enabled_zone(who.origin) && !scripts\zm\replaced\_zm_utility::check_point_in_kill_brush(who.origin)); valid_drop = scripts\zm\replaced\_zm_utility::check_point_in_life_brush(who.origin) || (check_point_in_enabled_zone(who.origin) && !scripts\zm\replaced\_zm_utility::check_point_in_kill_brush(who.origin));
if (valid_drop) if (valid_drop)
{ {
players = get_players();
foreach (player in players)
{
player thread scripts\zm\zgrief\zgrief_reimagined::show_grief_hud_msg(&"ZOMBIE_MEAT_DROPPED");
}
level.meat_powerup = maps\mp\zombies\_zm_powerups::specific_powerup_drop("meat_stink", who.origin); level.meat_powerup = maps\mp\zombies\_zm_powerups::specific_powerup_drop("meat_stink", who.origin);
} }
else else
@ -206,22 +216,6 @@ meat_stink(who)
} }
player thread print_meat_msg(who, "grabbed"); player thread print_meat_msg(who, "grabbed");
if (level.scr_zm_ui_gametype_obj == "zmeat")
{
if (player == who)
{
player thread scripts\zm\zgrief\zgrief_reimagined::show_grief_hud_msg(&"ZOMBIE_PLAYER_HAS_MEAT");
}
else if (player.team == who.team)
{
player thread scripts\zm\zgrief\zgrief_reimagined::show_grief_hud_msg(&"ZOMBIE_YOUR_TEAM_MEAT");
}
else
{
player thread scripts\zm\zgrief\zgrief_reimagined::show_grief_hud_msg(&"ZOMBIE_OTHER_TEAM_MEAT");
}
}
} }
who thread meat_stink_ignoreme_think(0); who thread meat_stink_ignoreme_think(0);
@ -374,11 +368,9 @@ meat_stink_cleanup_on_downed()
if (valid_drop) if (valid_drop)
{ {
players = get_players();
foreach (player in players) foreach (player in players)
{ {
player thread scripts\zm\zgrief\zgrief_reimagined::show_grief_hud_msg(&"ZOMBIE_MEAT_DROPPED"); player thread print_meat_msg(self, "dropped", 1);
} }
level.meat_powerup = maps\mp\zombies\_zm_powerups::specific_powerup_drop("meat_stink", self.origin); level.meat_powerup = maps\mp\zombies\_zm_powerups::specific_powerup_drop("meat_stink", self.origin);
@ -439,7 +431,7 @@ meat_stink_player(who, owner)
if (level.scr_zm_ui_gametype_obj == "zmeat") if (level.scr_zm_ui_gametype_obj == "zmeat")
{ {
level thread meat_stink(who); level thread meat_stink(who, owner);
return; return;
} }
@ -515,40 +507,34 @@ meat_stink_player_create()
self setclientfieldtoplayer("meat_stink", 1); self setclientfieldtoplayer("meat_stink", 1);
} }
print_meat_msg(meat_player, verb) print_meat_msg(meat_player, verb, show_after_obituaries = 0)
{ {
self endon("disconnect"); self endon("disconnect");
meat_player endon("disconnect"); meat_player endon("disconnect");
if (verb == "grabbed" || verb == "has") while (is_true(self.printing_meat_msg))
{ {
wait 0.05; // must wait to show after any obituaries that happened on the same frame self waittill("meat_msg_printed");
} }
hint_string = ""; self.printing_meat_msg = 1;
if (self.team == meat_player.team) if (show_after_obituaries)
{ {
if (verb == "grabbed") wait 0.05;
{
hint_string = &"ZOMBIE_GRABBED_MEAT";
}
else if (verb == "has")
{
hint_string = &"ZOMBIE_HAS_MEAT";
}
} }
else
meat = "_MEAT";
if (self.team != meat_player.team)
{ {
if (verb == "grabbed") meat = "_MEAT_ENEMY";
{
hint_string = &"ZOMBIE_GRABBED_MEAT_ENEMY";
}
else if (verb == "has")
{
hint_string = &"ZOMBIE_HAS_MEAT_ENEMY";
}
} }
hint_string = istring(toupper("ZOMBIE_" + verb + meat));
self iprintln(hint_string, meat_player.name); self iprintln(hint_string, meat_player.name);
self.printing_meat_msg = undefined;
self notify("meat_msg_printed");
} }

View File

@ -72,14 +72,6 @@ item_meat_on_spawn_retrieve_trigger(watcher, player, weaponname)
{ {
other_player.ignoreme = 0; other_player.ignoreme = 0;
} }
if (level.scr_zm_ui_gametype_obj == "zmeat")
{
if (!is_true(player._kicking_meat))
{
other_player thread scripts\zm\zgrief\zgrief_reimagined::show_grief_hud_msg(&"ZOMBIE_MEAT_THROWN");
}
}
} }
if (!(isdefined(self._fake_meat) && self._fake_meat)) if (!(isdefined(self._fake_meat) && self._fake_meat))

View File

@ -2663,11 +2663,6 @@ containment_think()
held_time["axis"] = getTime(); held_time["axis"] = getTime();
held_time["allies"] = getTime(); held_time["allies"] = getTime();
held_prev = "cont"; held_prev = "cont";
foreach (player in players)
{
player thread show_grief_hud_msg(&"ZOMBIE_CONTAINMENT_ZONE_CONTESTED");
}
} }
if ((level.grief_score["A"] + 1) >= get_gamemode_winning_score() || (level.grief_score["B"] + 1) >= get_gamemode_winning_score()) if ((level.grief_score["A"] + 1) >= get_gamemode_winning_score() || (level.grief_score["B"] + 1) >= get_gamemode_winning_score())
@ -2705,18 +2700,6 @@ containment_think()
held_time["allies"] = undefined; held_time["allies"] = undefined;
held_prev = "axis"; held_prev = "axis";
foreach (player in players)
{
if (player.team == "axis")
{
player thread show_grief_hud_msg(&"ZOMBIE_YOUR_TEAM_CONTAINMENT_ZONE");
}
else
{
player thread show_grief_hud_msg(&"ZOMBIE_OTHER_TEAM_CONTAINMENT_ZONE");
}
}
} }
} }
else if (in_containment_zone["allies"].size > in_containment_zone["axis"].size) else if (in_containment_zone["allies"].size > in_containment_zone["axis"].size)
@ -2748,18 +2731,6 @@ containment_think()
held_time["axis"] = undefined; held_time["axis"] = undefined;
held_prev = "allies"; held_prev = "allies";
foreach (player in players)
{
if (player.team == "axis")
{
player thread show_grief_hud_msg(&"ZOMBIE_OTHER_TEAM_CONTAINMENT_ZONE");
}
else
{
player thread show_grief_hud_msg(&"ZOMBIE_YOUR_TEAM_CONTAINMENT_ZONE");
}
}
} }
} }
else else
@ -2785,11 +2756,6 @@ containment_think()
held_time["axis"] = undefined; held_time["axis"] = undefined;
held_time["allies"] = undefined; held_time["allies"] = undefined;
held_prev = "none"; held_prev = "none";
foreach (player in players)
{
player thread show_grief_hud_msg(&"ZOMBIE_CONTAINMENT_ZONE_UNCONTROLLED");
}
} }
} }