From ad5db72c2a95722cd132a69f032c71c84a4094dd Mon Sep 17 00:00:00 2001 From: Jbleezy Date: Sun, 12 Mar 2023 17:37:59 -0700 Subject: [PATCH] Meat powerup: fix being able to drop when another meat powerup is already dropped --- README.md | 5 +++-- scripts/zm/zgrief/zgrief_reimagined.gsc | 18 +++++++++++++----- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 92573f16..8ab6d8d7 100644 --- a/README.md +++ b/README.md @@ -306,8 +306,9 @@ * Player who threw the meat can meat themself * Decreased time on ground from 16 seconds to 10 seconds * Bounces off walls when thrown -* Able to drop when players are down * Changed powerup fx color to blue +* Able to drop when players are down +* Fixed being able to drop when another meat powerup was already dropped * Message shows when the meat is grabbed and thrown on a player * Meleeing while the meat is moving no longer grabs the meat * Meleeing while the meat is moving throws the meat @@ -450,7 +451,7 @@ #### Cell Block * Added Smoke Grenades to the Mystery Box -* Added Richtofen Head meat powerup model +* Added Richtofen's Head meat powerup model ### Buried * Power automatically on diff --git a/scripts/zm/zgrief/zgrief_reimagined.gsc b/scripts/zm/zgrief/zgrief_reimagined.gsc index f0945554..efd0ca86 100644 --- a/scripts/zm/zgrief/zgrief_reimagined.gsc +++ b/scripts/zm/zgrief/zgrief_reimagined.gsc @@ -2339,21 +2339,29 @@ player_suicide() func_should_drop_meat() { - if(level.scr_zm_ui_gametype_obj == "zmeat") + if (level.scr_zm_ui_gametype_obj == "zmeat") { return 0; } - players = get_players(); - foreach(player in players) + foreach (powerup in level.active_powerups) { - if(player hasWeapon("item_meat_zm")) + if (powerup.powerup_name == "meat_stink") { return 0; } } - if(isDefined(level.item_meat) || is_true(level.meat_on_ground)) + players = get_players(); + foreach (player in players) + { + if (player hasWeapon("item_meat_zm")) + { + return 0; + } + } + + if (isDefined(level.item_meat) || is_true(level.meat_on_ground)) { return 0; }