From a0a6b148010abef025a69fe89a280a3f9af30375 Mon Sep 17 00:00:00 2001 From: Jbleezy Date: Thu, 23 Mar 2023 22:41:42 -0700 Subject: [PATCH] Monkey Bomb: fix no activation issue --- README.md | 3 ++ scripts/zm/_zm_reimagined.gsc | 2 ++ .../zm/replaced/_zm_weap_cymbal_monkey.gsc | 33 +++++++++++++++++++ 3 files changed, 38 insertions(+) create mode 100644 scripts/zm/replaced/_zm_weap_cymbal_monkey.gsc diff --git a/README.md b/README.md index ff650e47..3083446d 100644 --- a/README.md +++ b/README.md @@ -153,6 +153,9 @@ ### War Machine * Unupgraded: grenades explode on impact +### Monkey Bomb +* Fixed an issue where a Monkey Bomb wouldn't activate if the previously thrown Monkey Bomb hadn't activated yet + ### EMP Grenade * No longer disables HUD * Disables player's perks for 30 seconds diff --git a/scripts/zm/_zm_reimagined.gsc b/scripts/zm/_zm_reimagined.gsc index b1988722..2826c5b2 100644 --- a/scripts/zm/_zm_reimagined.gsc +++ b/scripts/zm/_zm_reimagined.gsc @@ -22,6 +22,7 @@ #include scripts\zm\replaced\_zm_melee_weapon; #include scripts\zm\replaced\_zm_weap_ballistic_knife; #include scripts\zm\replaced\_zm_weap_claymore; +#include scripts\zm\replaced\_zm_weap_cymbal_monkey; main() { @@ -81,6 +82,7 @@ main() replaceFunc(maps\mp\zombies\_zm_melee_weapon::change_melee_weapon, scripts\zm\replaced\_zm_melee_weapon::change_melee_weapon); replaceFunc(maps\mp\zombies\_zm_weap_ballistic_knife::watch_use_trigger, scripts\zm\replaced\_zm_weap_ballistic_knife::watch_use_trigger); replaceFunc(maps\mp\zombies\_zm_weap_claymore::claymore_detonation, scripts\zm\replaced\_zm_weap_claymore::claymore_detonation); + replaceFunc(maps\mp\zombies\_zm_weap_cymbal_monkey::player_handle_cymbal_monkey, scripts\zm\replaced\_zm_weap_cymbal_monkey::player_handle_cymbal_monkey); } init() diff --git a/scripts/zm/replaced/_zm_weap_cymbal_monkey.gsc b/scripts/zm/replaced/_zm_weap_cymbal_monkey.gsc new file mode 100644 index 00000000..22f96063 --- /dev/null +++ b/scripts/zm/replaced/_zm_weap_cymbal_monkey.gsc @@ -0,0 +1,33 @@ +#include common_scripts\utility; +#include maps\mp\_utility; +#include maps\mp\zombies\_zm_utility; +#include maps\mp\zombies\_zm_laststand; +#include maps\mp\zombies\_zm_clone; +#include maps\mp\zombies\_zm_weap_cymbal_monkey; + +player_handle_cymbal_monkey() +{ + self notify( "starting_monkey_watch" ); + self endon( "disconnect" ); + self endon( "starting_monkey_watch" ); + attract_dist_diff = level.monkey_attract_dist_diff; + + if ( !isdefined( attract_dist_diff ) ) + attract_dist_diff = 45; + + num_attractors = level.num_monkey_attractors; + + if ( !isdefined( num_attractors ) ) + num_attractors = 96; + + max_attract_dist = level.monkey_attract_dist; + + if ( !isdefined( max_attract_dist ) ) + max_attract_dist = 1536; + + while ( true ) + { + grenade = get_thrown_monkey(); + self thread player_throw_cymbal_monkey( grenade, num_attractors, max_attract_dist, attract_dist_diff ); + } +} \ No newline at end of file