diff --git a/README.md b/README.md index 19586c30..1de36432 100644 --- a/README.md +++ b/README.md @@ -524,10 +524,11 @@ * Gain 250 score to win the game * Meat powerup always spawns from the first zombie killed * All zombies go after player holding meat -* Throwing the meat on the ground makes it a grabbable powerup -* Throwing the meat onto another player makes them hold the meat * Player holding the meat moves at 60% speed * Player holding the meat gains 100 points when their team gains score +* Downing while holding the meat drops it as a powerup +* Throwing the meat on the ground drops it as a powerup +* Throwing the meat onto another player makes them hold the meat * Players respawn after being down for 10 seconds * Players retain perks diff --git a/scripts/zm/zgrief/zgrief_reimagined.gsc b/scripts/zm/zgrief/zgrief_reimagined.gsc index 1f31dd54..d2c97e0c 100644 --- a/scripts/zm/zgrief/zgrief_reimagined.gsc +++ b/scripts/zm/zgrief/zgrief_reimagined.gsc @@ -2993,6 +2993,8 @@ meat_stink_player(meat_player) } meat_player thread meat_stink_player_create(); + + meat_player thread meat_powerup_drop_on_downed(); } meat_unstink_player(meat_player) @@ -3015,6 +3017,8 @@ meat_unstink_player(meat_player) player thread meat_stink_player_cleanup(); } + + meat_player notify("meat_unstink_player"); } meat_stink_player_create() @@ -3042,6 +3046,31 @@ meat_stink_player_cleanup() self setclientfieldtoplayer( "meat_stink", 0 ); } +meat_powerup_drop_on_downed() +{ + self endon("disconnect"); + self endon("bled_out"); + self endon("meat_unstink_player"); + + self waittill("player_downed"); + + valid_drop = 0; + playable_area = getentarray("player_volume", "script_noteworthy"); + for (i = 0; i < playable_area.size; i++) + { + if (self isTouching(playable_area[i])) + { + valid_drop = 1; + break; + } + } + + if (valid_drop) + { + maps\mp\zombies\_zm_powerups::specific_powerup_drop( "meat_stink", self.origin ); + } +} + meat_hud_destroy_on_end_game() { level waittill("end_game");