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,14 @@
// T6 GSC SOURCE
// Generated by https://github.com/xensik/gsc-tool
#include clientscripts\mp\_utility;
#include clientscripts\mp\zombies\_zm_utility;
precache()
{
}
init()
{
}

View File

@ -31329,3 +31329,242 @@
"classname" "node_pathnode" "classname" "node_pathnode"
"guid" "CC9CDDB8" "guid" "CC9CDDB8"
} }
{
"origin" "0 0 -500"
"export" "1"
"model" "veh_t6_dlc_zm_mech"
"classname" "actor_zm_tomb_mech_zombie"
"script_noteworthy" "mechz_spawner"
"spawnflags" "1"
}
{
"targetname" "zone_green_start_spawners"
"script_noteworthy" "mechz_location"
"origin" "1543.26 1403.97 3392.13"
"classname" "script_struct"
"angles" "0 0 0"
}
{
"targetname" "zone_green_level1_spawners"
"script_noteworthy" "mechz_location"
"origin" "2203.56 1565.42 3398.49"
"classname" "script_struct"
"angles" "0 0 0"
}
{
"targetname" "zone_green_level2a_spawners"
"script_noteworthy" "mechz_location"
"origin" "2057.82 1292.39 3219.26"
"classname" "script_struct"
"angles" "0 0 0"
}
{
"targetname" "zone_green_level2b_spawners"
"script_noteworthy" "mechz_location"
"origin" "1452.33 1627.78 3216.13"
"classname" "script_struct"
"angles" "0 0 0"
}
{
"targetname" "zone_green_level3a_spawners"
"script_noteworthy" "mechz_location"
"origin" "1685.17 2067.07 3046.09"
"classname" "script_struct"
"angles" "0 0 0"
}
{
"targetname" "zone_orange_level1_spawners"
"script_noteworthy" "mechz_location"
"origin" "2971.25 1990.43 2955.24"
"classname" "script_struct"
"angles" "0 0 0"
}
{
"targetname" "zone_orange_level1_spawners"
"script_noteworthy" "mechz_location"
"origin" "2618.8 1747.15 2852.12"
"classname" "script_struct"
"angles" "0 0 0"
}
{
"targetname" "zone_orange_level2_spawners"
"script_noteworthy" "mechz_location"
"origin" "2646.38 1274.17 2654.02"
"classname" "script_struct"
"angles" "0 0 0"
}
{
"targetname" "zone_orange_elevator_shaft_middle_1_spawners"
"script_noteworthy" "mechz_location"
"origin" "3431.56 2073.77 2490.93"
"classname" "script_struct"
"angles" "0 0 0"
}
{
"targetname" "zone_orange_elevator_shaft_middle_2_spawners"
"script_noteworthy" "mechz_location"
"origin" "3726.62 1772.9 2229.33"
"classname" "script_struct"
"angles" "0 0 0"
}
{
"targetname" "zone_orange_level3a_spawners"
"script_noteworthy" "mechz_location"
"origin" "4334.71 1649 1720.64"
"classname" "script_struct"
"angles" "0 0 0"
}
{
"targetname" "zone_orange_level3b_spawners"
"script_noteworthy" "mechz_location"
"origin" "4011.17 1344.05 1651.87"
"classname" "script_struct"
"angles" "0 0 0"
}
{
"targetname" "zone_orange_level3b_spawners"
"script_noteworthy" "mechz_location"
"origin" "3260.03 1386.41 1316.37"
"classname" "script_struct"
"angles" "0 0 0"
}
{
"targetname" "zone_blue_level4a_spawners"
"script_noteworthy" "mechz_location"
"origin" "3126.67 498.965 1296.13"
"classname" "script_struct"
"angles" "0 0 0"
}
{
"targetname" "zone_blue_level4a_spawners"
"script_noteworthy" "mechz_location"
"origin" "2014.02 526.034 1296.46"
"classname" "script_struct"
"angles" "0 0 0"
}
{
"targetname" "zone_blue_level4c_spawners"
"script_noteworthy" "mechz_location"
"origin" "2650.14 -459.034 1296.13"
"classname" "script_struct"
"angles" "0 0 0"
}
{
"targetname" "zone_blue_level4b_spawners"
"script_noteworthy" "mechz_location"
"origin" "1516.2 -438.535 1296.13"
"classname" "script_struct"
"angles" "0 0 0"
}
{
"targetname" "zone_blue_level5_spawners"
"script_noteworthy" "mechz_location"
"origin" "1985.01 -199.889 1120.13"
"classname" "script_struct"
"angles" "0 0 0"
}
{
"targetname" "zone_blue_level5_spawners"
"script_noteworthy" "mechz_location"
"origin" "1520.7 -454.917 1120.13"
"classname" "script_struct"
"angles" "0 0 0"
}
{
"targetname" "zone_blue_level5_spawners"
"script_noteworthy" "mechz_location"
"origin" "2019.77 770.722 1120.13"
"classname" "script_struct"
"angles" "0 0 0"
}
{
"targetname" "zone_blue_level5_spawners"
"script_noteworthy" "mechz_location"
"origin" "2830.01 845.753 1120.13"
"classname" "script_struct"
"angles" "0 0 0"
}
{
"targetname" "zone_blue_level1a_spawners"
"script_noteworthy" "mechz_location"
"origin" "2528.77 -519.947 2880.13"
"classname" "script_struct"
"angles" "0 0 0"
}
{
"targetname" "zone_blue_level1a_spawners"
"script_noteworthy" "mechz_location"
"origin" "2100.78 385.804 2880.13"
"classname" "script_struct"
"angles" "0 0 0"
}
{
"targetname" "zone_blue_level2b_spawners"
"script_noteworthy" "mechz_location"
"origin" "2036.23 392.668 2704.13"
"classname" "script_struct"
"angles" "0 0 0"
}
{
"targetname" "zone_blue_level2b_spawners"
"script_noteworthy" "mechz_location"
"origin" "2435.87 590.875 2704.13"
"classname" "script_struct"
"angles" "0 0 0"
}
{
"targetname" "zone_blue_level2a_spawners"
"script_noteworthy" "mechz_location"
"origin" "2662.58 175.902 2704.13"
"classname" "script_struct"
"angles" "0 0 0"
}
{
"targetname" "zone_blue_level2c_spawners"
"script_noteworthy" "mechz_location"
"origin" "2910.82 81.4468 2704.13"
"classname" "script_struct"
"angles" "0 0 0"
}
{
"targetname" "zone_blue_level2d_spawners"
"script_noteworthy" "mechz_location"
"origin" "3098.91 307.819 2714.13"
"classname" "script_struct"
"angles" "0 0 0"
}
{
"targetname" "zone_blue_level1c_spawners"
"script_noteworthy" "mechz_location"
"origin" "2034.18 696.061 3136.13"
"classname" "script_struct"
"angles" "0 0 0"
}
{
"targetname" "zone_blue_level1a_spawners"
"script_noteworthy" "mechz_location"
"origin" "2723.02 194.534 3016.13"
"classname" "script_struct"
"angles" "0 0 0"
}
{
"targetname" "zone_blue_level1b_spawners"
"script_noteworthy" "mechz_location"
"origin" "2973.15 201.932 2880.13"
"classname" "script_struct"
"angles" "0 0 0"
}
{
"targetname" "zone_green_level3b_spawners"
"script_noteworthy" "mechz_location"
"origin" "2058.92 1448.33 3047.39"
"classname" "script_struct"
"angles" "0 0 0"
}
{
"targetname" "zone_green_level3c_spawners"
"script_noteworthy" "mechz_location"
"origin" "1659.98 1308.56 3047.23"
"classname" "script_struct"
"angles" "0 0 0"
}

View File

@ -130,6 +130,8 @@ avogadro_prespawn()
self endon( "death" ); self endon( "death" );
level endon( "intermission" ); level endon( "intermission" );
level.avogadro = self; level.avogadro = self;
self.ignore_distance_tracking = true;
self.exclude_distance_cleanup_adding_to_total = true;
self.immune_to_slowgun = true; self.immune_to_slowgun = true;
self.has_legs = 1; self.has_legs = 1;
self.no_gib = 1; self.no_gib = 1;

View File

@ -402,6 +402,8 @@ brutus_spawn( starting_health, has_helmet, helmet_hits, explosive_dmg_taken, zon
self.ignore_inert = true; self.ignore_inert = true;
self.ignore_lava_damage = true; self.ignore_lava_damage = true;
self.ignore_electric_trap = true; self.ignore_electric_trap = true;
self.ignore_distance_tracking = true;
self.exclude_distance_cleanup_adding_to_total = true;
self.zombie_init_done = 1; self.zombie_init_done = 1;
self notify( "zombie_init_done" ); self notify( "zombie_init_done" );
self.allowpain = 0; self.allowpain = 0;

View File

@ -398,6 +398,8 @@ dog_init()
self.script_noteworthy = undefined; self.script_noteworthy = undefined;
self.animname = "zombie_dog"; self.animname = "zombie_dog";
self.no_gib = true; self.no_gib = true;
self.ignore_distance_tracking = false;
self.exclude_distance_cleanup_adding_to_total = false;
self.ignoreall = 1; self.ignoreall = 1;
self.ignoreme = 1; self.ignoreme = 1;
self.allowdeath = 1; self.allowdeath = 1;

View File

@ -625,6 +625,8 @@ prespawn()
self.ignore_inert = true; self.ignore_inert = true;
self.ignore_lava_damage = true; self.ignore_lava_damage = true;
self.ignore_electric_trap = true; self.ignore_electric_trap = true;
self.ignore_distance_tracking = false;
self.exclude_distance_cleanup_adding_to_total = false;
self maps\mp\zombies\_zm_ai_ghost_ffotd::prespawn_start(); self maps\mp\zombies\_zm_ai_ghost_ffotd::prespawn_start();
self.startinglocation = self.origin; self.startinglocation = self.origin;
self.animname = "ghost_zombie"; self.animname = "ghost_zombie";

File diff suppressed because it is too large Load Diff

View File

@ -630,6 +630,7 @@ mechz_spawn()
self.meleedamage = 75; self.meleedamage = 75;
self.custom_item_dmg = 2000; self.custom_item_dmg = 2000;
self.ignore_distance_tracking = true; self.ignore_distance_tracking = true;
self.exclude_distance_cleanup_adding_to_total = true;
recalc_zombie_array(); recalc_zombie_array();
width = 15; width = 15;
height = 60; height = 60;

View File

@ -1,6 +1,7 @@
#include maps\mp\zombies\_zm_utility; #include maps\mp\zombies\_zm_utility;
#include common_scripts\utility; #include common_scripts\utility;
#include maps\mp\_utility; #include maps\mp\_utility;
#include maps\mp\zombies\_zm_spawner;
#include maps\mp\zombies\_zm_ai_avogadro; #include maps\mp\zombies\_zm_ai_avogadro;
#include maps\mp\zombies\_zm_ai_screecher; #include maps\mp\zombies\_zm_ai_screecher;
@ -73,6 +74,45 @@ init()
level [[ level.ai_data[ keys[ i ] ].init ]](); level [[ level.ai_data[ keys[ i ] ].init ]]();
} }
} }
level thread add_spawn_functions_to_spawners();
}
watch_for_damage_from_players()
{
self endon( "death" );
for (;;)
{
self waittill( "damage", amount, attacker, direction_vec, point, type );
if ( !isdefined( amount ) )
continue;
if ( !isalive( self ) || self.delayeddeath )
return;
if ( !player_attacker( attacker ) )
continue;
self.has_been_damaged_by_player = true;
if ( is_true( self.is_ghost ) )
{
continue;
}
self player_attacks_enemy( attacker, amount, type, point );
}
}
add_spawn_functions_to_spawners()
{
flag_wait( "initial_blackscreen_passed" );
if ( isDefined( level.ghost_spawners ) )
{
array_thread( level.ghost_spawners, ::add_spawn_function, ::watch_for_damage_from_players );
}
} }
add_visionset_callback( func ) add_visionset_callback( func )
@ -330,3 +370,29 @@ check_solo_status()
level.is_forever_solo_game = 0; level.is_forever_solo_game = 0;
} }
} }
increment_enemy_count( who )
{
if ( !is_true( who.has_been_damaged_by_player ) )
{
return;
}
if ( is_true( who.is_leaper ) )
{
who thread [maps\mp\zombies\_zm_ai_leaper::leaper_cleanup]();
}
else if ( is_true( who.is_mechz ) )
{
level.mechz_left_to_spawn++;
}
else if ( is_true( who.is_brutus ) )
{
level.brutus_count++;
}
//Maybe add dog increment here when possible
else
{
level.zombie_total++;
}
}

View File

@ -0,0 +1,33 @@
#include maps\mp\zombies\_zm_utility;
#include common_scripts\utility;
#include maps\mp\_utility;
#include maps\mp\zm_buried_classic;
#include scripts\zm\zm_ai_pack_mod_main;
main()
{
}
squashed_death_init( kill_if_falling )
{
while ( true )
{
self waittill( "trigger", who );
if ( !( isdefined( who.insta_killed ) && who.insta_killed ) )
{
if ( isplayer( who ) )
who thread insta_kill_player( 1, kill_if_falling );
else if ( isai( who ) )
{
who dodamage( who.health + 100, who.origin );
who.insta_killed = 1;
increment_enemy_count( who );
}
}
}
}

View File

@ -0,0 +1,85 @@
#include maps\mp\zombies\_zm_utility;
#include common_scripts\utility;
#include maps\mp\_utility;
#include maps\mp\zm_highrise_classic;
#include scripts\zm\zm_ai_pack_mod_main;
main()
{
replaceFunc( maps\mp\zm_highrise_classic::squashed_death_init, ::squashed_death_init_override );
replaceFunc( maps\mp\zm_highrise::elevator_traverse_watcher, ::elevator_traverse_watcher_override );
}
squashed_death_init_override( kill_if_falling )
{
while ( true )
{
self waittill( "trigger", who );
if ( !is_true( who.insta_killed ) )
{
continue;
}
if ( isplayer( who ) )
{
who thread elevator_black_screen_squash_check();
who thread insta_kill_player( 1, kill_if_falling );
}
else if ( isai( who ) )
{
if ( is_true( who.in_the_ceiling ) )
{
continue;
}
if ( is_true( who.is_avogadro ) )
{
continue;
}
who dodamage( who.health + 100, who.origin );
who.insta_killed = 1;
increment_enemy_count( who );
}
}
}
elevator_traverse_watcher_override()
{
self endon( "death" );
while ( true )
{
wait 0.2;
if ( !is_true( self.is_traversing ) )
{
continue;
}
self.elevator_parent = undefined;
if ( !is_true( self maps\mp\zm_highrise_elevators::object_is_on_elevator() ) )
{
continue;
}
if ( !isdefined( self.elevator_parent ) )
{
continue;
}
if ( !is_true( self.elevator_parent.is_moving ) )
{
continue;
}
playfx( level._effect["zomb_gib"], self.origin );
increment_enemy_count( self );
self delete();
return;
}
}

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;
}
}

View File

@ -148,3 +148,18 @@ xmodel,c_zom_leaper_body_g_behead
xmodel,c_zom_leaper_body_g_lowclean xmodel,c_zom_leaper_body_g_lowclean
script,character/clientscripts/c_zom_leaper.csc script,character/clientscripts/c_zom_leaper.csc
script,aitype/clientscripts/zm_highrise_leaper.csc script,aitype/clientscripts/zm_highrise_leaper.csc
fx,maps/zombie/fx_zmb_leaper_walk
footstepfxtable,zm_leaper_footstepfxtable
material,gfx_fxt_env_electric_arc2_add_eo10
material,,gfx_fxt_debris_clump_ds128_z10
fx,maps/zombie/fx_zmb_leaper_death
techniqueset,effect_z096f2e2
material,gfx_fxt_env_lightning_bolt_ground
image,,fxt_lensflare_stripe_white
material,gfx_fxt_lensflare_stripe_white
fx,maps/zombie/fx_zmb_leaper_spawn
image,fxt_smk_trail_wisp
material,gfx_fxt_smk_trail_wisp
fx,maps/zombie/fx_zmb_leaper_trail
fx,maps/zombie/fx_zmb_leaper_wall_impact

View File

@ -56,6 +56,9 @@ script,clientscripts/mp/zombies/_zm_ai_avogadro.csc
script,maps/mp/zombies/_zm_ai_screecher.gsc script,maps/mp/zombies/_zm_ai_screecher.gsc
script,clientscripts/mp/zombies/_zm_ai_screecher.csc script,clientscripts/mp/zombies/_zm_ai_screecher.csc
script,maps/mp/zombies/_zm_ai_leaper.gsc
script,clientscripts/mp/zombies/_zm_ai_leaper.csc
script,scripts/zm/zm_ai_pack_mod_debug_main.csc script,scripts/zm/zm_ai_pack_mod_debug_main.csc
script,scripts/zm/zm_ai_pack_mod_debug_main.gsc script,scripts/zm/zm_ai_pack_mod_debug_main.gsc
script,scripts/zm/zm_ai_pack_mod_main.csc script,scripts/zm/zm_ai_pack_mod_main.csc