Add support for leapers. Add mechz to zm_highrise.

Patch multiple level.zombie_total++ occurences to fix interactions with boss zombies not incrementing their zombie total.
This commit is contained in:
JezuzLizard
2024-02-20 22:14:48 -08:00
parent 963e62d02d
commit 3eff80fcf3
14 changed files with 1796 additions and 3 deletions

View File

@ -0,0 +1,47 @@
#include maps\mp\zombies\_zm_utility;
#include common_scripts\utility;
#include maps\mp\_utility;
main()
{
replaceFunc( maps\mp\zm_transit_power::killzombiesinpowerstation, ::killzombiesinpowerstation_override );
}
killzombiesinpowerstation_override()
{
level endon( "power_on" );
radiussq = 122500;
while ( true )
{
zombies = getaiarray( level.zombie_team );
foreach ( zombie in zombies )
{
if ( !isdefined( zombie ) )
continue;
if ( isdefined( zombie.is_avogadro ) && zombie.is_avogadro )
continue;
if ( is_true( zombie.is_boss ) )
{
continue;
}
if ( distancesquared( ( 11344, 7590, -729 ), zombie.origin ) < radiussq )
continue;
if ( isdefined( zombie ) && zombie maps\mp\zombies\_zm_zonemgr::entity_in_zone( "zone_prr", 1 ) || isdefined( zombie.zone_name ) && zombie.zone_name == "zone_prr" )
{
if ( !( isdefined( zombie.has_been_damaged_by_player ) && zombie.has_been_damaged_by_player ) )
level.zombie_total++;
zombie dodamage( zombie.health + 100, zombie.origin );
wait( randomfloatrange( 0.05, 0.15 ) );
}
}
wait 1;
}
}