From 910eaa8f39c43ab9133d9b2324fc46dc656b62f1 Mon Sep 17 00:00:00 2001 From: Jbleezy Date: Sun, 26 Feb 2023 20:13:34 -0800 Subject: [PATCH] Meat on Cell Block: remove meat from wolf powerups --- .../zm/replaced/zm_alcatraz_weap_quest.gsc | 52 +++++++++++++++++++ scripts/zm/zm_prison/zm_prison_reimagined.gsc | 1 + 2 files changed, 53 insertions(+) create mode 100644 scripts/zm/replaced/zm_alcatraz_weap_quest.gsc diff --git a/scripts/zm/replaced/zm_alcatraz_weap_quest.gsc b/scripts/zm/replaced/zm_alcatraz_weap_quest.gsc new file mode 100644 index 00000000..8db03c3f --- /dev/null +++ b/scripts/zm/replaced/zm_alcatraz_weap_quest.gsc @@ -0,0 +1,52 @@ +#include maps\mp\_utility; +#include common_scripts\utility; +#include maps\mp\zombies\_zm_utility; +#include maps\mp\zm_alcatraz_weap_quest; + +wolf_spit_out_powerup() +{ + if ( !( isdefined( level.enable_magic ) && level.enable_magic ) ) + return; + + power_origin_struct = getstruct( "wolf_puke_powerup_origin", "targetname" ); + + if ( level.scr_zm_ui_gametype_obj != "zmeat" && randomint( 100 ) < 20 ) + { + for ( i = 0; i < level.zombie_powerup_array.size; i++ ) + { + if ( level.zombie_powerup_array[i] == "meat_stink" ) + { + level.zombie_powerup_index = i; + found = 1; + break; + } + } + } + else + { + while ( true ) + { + level.zombie_powerup_index = randomint( level.zombie_powerup_array.size ); + + if ( level.zombie_powerup_array[level.zombie_powerup_index] == "nuke" ) + { + wait 0.05; + continue; + } + + if ( level.scr_zm_ui_gametype_obj == "zmeat" && level.zombie_powerup_array[level.zombie_powerup_index] == "meat_stink" ) + { + wait 0.05; + continue; + } + + break; + } + } + + spawn_infinite_powerup_drop( power_origin_struct.origin, level.zombie_powerup_array[level.zombie_powerup_index] ); + power_ups = get_array_of_closest( power_origin_struct.origin, level.active_powerups, undefined, undefined, 100 ); + + if ( isdefined( power_ups[0] ) ) + power_ups[0] movez( 120, 4 ); +} \ No newline at end of file diff --git a/scripts/zm/zm_prison/zm_prison_reimagined.gsc b/scripts/zm/zm_prison/zm_prison_reimagined.gsc index 911879b9..73f02839 100644 --- a/scripts/zm/zm_prison/zm_prison_reimagined.gsc +++ b/scripts/zm/zm_prison/zm_prison_reimagined.gsc @@ -12,6 +12,7 @@ main() { replaceFunc(maps\mp\zm_alcatraz_classic::give_afterlife, scripts\zm\replaced\zm_alcatraz_classic::give_afterlife); + replaceFunc(maps\mp\zm_alcatraz_weap_quest::wolf_spit_out_powerup, scripts\zm\replaced\zm_alcatraz_weap_quest::wolf_spit_out_powerup); replaceFunc(maps\mp\zombies\_zm_afterlife::afterlife_add, scripts\zm\replaced\_zm_afterlife::afterlife_add); replaceFunc(maps\mp\zombies\_zm_ai_brutus::brutus_spawn, scripts\zm\replaced\_zm_ai_brutus::brutus_spawn); replaceFunc(maps\mp\zombies\_zm_ai_brutus::brutus_health_increases, scripts\zm\replaced\_zm_ai_brutus::brutus_health_increases);