From fa6449a48e16db2255f06fc0e2811a98a81b2c91 Mon Sep 17 00:00:00 2001 From: Jbleezy Date: Mon, 17 Apr 2023 00:52:07 -0700 Subject: [PATCH] Die Rise: zombies are no longer killed while spawning in a stationary elevator --- README.md | 2 +- scripts/zm/replaced/zm_highrise_elevators.gsc | 40 ++++++++++++++++++- .../zm/zm_highrise/zm_highrise_reimagined.gsc | 10 +++++ 3 files changed, 50 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 9c965eea..33b67d4c 100644 --- a/README.md +++ b/README.md @@ -578,7 +578,7 @@ * Escape pod can be used with any amount of players * Moved weapon locker to the downstairs fridge * Quick Revive elevator randomizes with Speed Cola and Who's Who elevators -* Zombies no longer spawn in an elevator when the elevator is within 1 floor of the spawn location +* Zombies are no longer killed while spawning in a stationary elevator * Zombies no longer spawn in the Upper Blue Highrise zone when in the Green Highrise zone * Zombies no longer spawn in the zone next to the Lower Orange Highrise zone when in the Lower Orange Highrise zone while the debris is closed * Fixed weapon model angle on upside down Mystery Box diff --git a/scripts/zm/replaced/zm_highrise_elevators.gsc b/scripts/zm/replaced/zm_highrise_elevators.gsc index 0844dfc3..c92b27c8 100644 --- a/scripts/zm/replaced/zm_highrise_elevators.gsc +++ b/scripts/zm/replaced/zm_highrise_elevators.gsc @@ -255,7 +255,7 @@ faller_location_logic() faller_spawn_points = getstructarray( "faller_location", "script_noteworthy" ); leaper_spawn_points = getstructarray( "leaper_location", "script_noteworthy" ); spawn_points = arraycombine( faller_spawn_points, leaper_spawn_points, 1, 0 ); - dist_check = 65536; + dist_check = 16384; elevator_names = getarraykeys( level.elevators ); elevators = []; @@ -322,6 +322,44 @@ faller_location_logic() disable_elevator_spawners( volume, spawn_points ); } + wait 0.05; + } +} + +watch_for_elevator_during_faller_spawn() +{ + self endon( "death" ); + self endon( "risen" ); + self endon( "spawn_anim" ); + + while ( true ) + { + should_gib = 0; + + foreach ( elevator in level.elevators ) + { + if ( is_true( elevator.body.is_moving ) && self istouching( elevator.body ) ) + should_gib = 1; + } + + if ( should_gib ) + { + playfx( level._effect["zomb_gib"], self.origin ); + + if ( !( isdefined( self.has_been_damaged_by_player ) && self.has_been_damaged_by_player ) && !( isdefined( self.is_leaper ) && self.is_leaper ) ) + level.zombie_total++; + + if ( isdefined( self.is_leaper ) && self.is_leaper ) + { + self maps\mp\zombies\_zm_ai_leaper::leaper_cleanup(); + self dodamage( self.health + 100, self.origin ); + } + else + self delete(); + + break; + } + wait 0.05; } } \ No newline at end of file diff --git a/scripts/zm/zm_highrise/zm_highrise_reimagined.gsc b/scripts/zm/zm_highrise/zm_highrise_reimagined.gsc index 25cd1d97..cc78efc2 100644 --- a/scripts/zm/zm_highrise/zm_highrise_reimagined.gsc +++ b/scripts/zm/zm_highrise/zm_highrise_reimagined.gsc @@ -58,6 +58,7 @@ init() slipgun_change_ammo(); + level thread custom_faller_entrance_logic(); level thread elevator_call(); level thread escape_pod_call(); } @@ -143,6 +144,15 @@ onbuyweapon_slipgun( player ) level notify( "slipgun_bought", player ); } +custom_faller_entrance_logic() +{ + flag_wait( "initial_blackscreen_passed" ); + + wait 1; + + level.custom_faller_entrance_logic = scripts\zm\replaced\zm_highrise_elevators::watch_for_elevator_during_faller_spawn; +} + elevator_call() { trigs = getentarray( "elevator_key_console_trigger", "targetname" );