diff --git a/zm_ai_pack/animstatedefs/zm_transit_avogadro.asd b/zm_ai_pack/animstatedefs/zm_transit_avogadro.asd index 4192ec2..093f691 100644 --- a/zm_ai_pack/animstatedefs/zm_transit_avogadro.asd +++ b/zm_ai_pack/animstatedefs/zm_transit_avogadro.asd @@ -165,7 +165,10 @@ zm_traverse_barrier : aliased restart notify traverse_anim barrier_crawl ai_zombie_traverse_v4 } - +zm_taunt : restart notify taunt_anim +{ + ai_zombie_avogadro_melee_attack_v1 +} diff --git a/zm_ai_pack/clientscripts/mp/zombies/_zm_ai_brutus.csc b/zm_ai_pack/clientscripts/mp/zombies/_zm_ai_brutus.csc index f1886fe..6da9188 100644 --- a/zm_ai_pack/clientscripts/mp/zombies/_zm_ai_brutus.csc +++ b/zm_ai_pack/clientscripts/mp/zombies/_zm_ai_brutus.csc @@ -19,8 +19,6 @@ init() main() { - //registerclientfield( "actor", "helmet_off", 9000, 1, "int", ::brutus_helmet_launch_cb ); - //registerclientfield( "actor", "brutus_lock_down", 9000, 1, "int", ::brutus_lock_down_effects_cb ); register_clientfield_alt( "actor", "brutus_lock_down", "int", ::brutus_lock_down_effects_cb_alt ); registerbrutusfootstepcb( "zm_alcatraz_brutus", ::brutusfootstepcbfunc ); } diff --git a/zm_ai_pack/clientscripts/mp/zombies/_zm_ai_mechz.csc b/zm_ai_pack/clientscripts/mp/zombies/_zm_ai_mechz.csc index f021098..c7cdc13 100644 --- a/zm_ai_pack/clientscripts/mp/zombies/_zm_ai_mechz.csc +++ b/zm_ai_pack/clientscripts/mp/zombies/_zm_ai_mechz.csc @@ -19,7 +19,7 @@ init_animtree() { wait 0.05; } - + scriptmodelsuseanimtree( #animtree ); } @@ -52,7 +52,7 @@ main() register_clientfield_alt( "actor", "mechz_fx", "int", ::mechz_handle_fx_alt ); //registerclientfield( "actor", "mechz_fx", 14000, 12, "int", ::mechz_handle_fx ); //registerclientfield( "toplayer", "mechz_grab", 14000, 1, "int", ::mechz_claw_callback ); - if ( getDvar( "mapname" ) != "zm_buried" && getDvar( "g_gametype" ) != "zclassic" ) + if ( getDvar( "mapname" ) != "zm_buried" || getDvar( "g_gametype" ) != "zclassic" ) { registerclientfield( "actor", "anim_rate", 14000, 2, "float", undefined, 0 ); setupclientfieldanimspeedcallbacks( "actor", 1, "anim_rate" ); @@ -436,7 +436,7 @@ sndflamethrower_start( localclientnum, index, tag_name ) sndent linkto( self, tag_name ); sndent playsound( 0, "zmb_ai_mechz_flame_start" ); sndent playloopsound( "zmb_ai_mechz_flame_loop", 0.6 ); - self thread sndflamethrower_stop( sndent, index ); + sndflamethrower_stop( sndent, index ); } sndflamethrower_stop( ent, index ) diff --git a/zm_ai_pack/maps/mp/zm_prison.d3dbsp b/zm_ai_pack/maps/mp/zm_prison.d3dbsp index bcfca91..77c569b 100644 --- a/zm_ai_pack/maps/mp/zm_prison.d3dbsp +++ b/zm_ai_pack/maps/mp/zm_prison.d3dbsp @@ -21117,4 +21117,306 @@ "classname" "script_model" "angles" "0 269.7 0" "guid" "B0A2237E" +} +{ +"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_start_spawners" +"script_noteworthy" "mechz_location" +"origin" "1985.31 10460.4 1338.21" +"classname" "script_struct" +"angles" "0 0 0" +} +{ +"targetname" "zone_library_spawners" +"script_noteworthy" "mechz_location" +"origin" "443 10624.6 1336.13" +"classname" "script_struct" +"angles" "0 0 0" +} +{ +"targetname" "zone_cellblock_west_spawner" +"script_noteworthy" "mechz_location" +"origin" "446.413 10163.4 1340.23" +"classname" "script_struct" +"angles" "0 0 0" +} +{ +"targetname" "zone_cellblock_west_gondola_spawner" +"script_noteworthy" "mechz_location" +"origin" "913.204 9695.95 1545.13" +"classname" "script_struct" +"angles" "0 0 0" +} +{ +"targetname" "zone_cellblock_west_gondola_spawner" +"script_noteworthy" "mechz_location" +"origin" "848.482 9215.44 1545.04" +"classname" "script_struct" +"angles" "0 0 0" +} +{ +"targetname" "zone_cellblock_west_gondola_dock_spawner" +"script_noteworthy" "mechz_location" +"origin" "822.42 8441.96 1544.13" +"classname" "script_struct" +"angles" "0 0 0" +} +{ +"targetname" "zone_cellblock_east_spawner" +"script_noteworthy" "mechz_location" +"origin" "1747.98 9074.95 1336.13" +"classname" "script_struct" +"angles" "0 0 0" +} +{ +"targetname" "zone_cellblock_east_spawner" +"script_noteworthy" "mechz_location" +"origin" "2010.31 9660.37 1344.13" +"classname" "script_struct" +"angles" "0 0 0" +} +{ +"targetname" "zone_cafeteria_spawner" +"script_noteworthy" "mechz_location" +"origin" "2511.35 9698.52 1336.13" +"classname" "script_struct" +"angles" "0 0 0" +} +{ +"targetname" "zone_cafeteria_end_spawner" +"script_noteworthy" "mechz_location" +"origin" "3270.96 9346.17 1336.13" +"classname" "script_struct" +"angles" "0 0 0" +} +{ +"targetname" "zone_infirmary_spawner" +"script_noteworthy" "mechz_location" +"origin" "2298.21 9549.65 1528.13" +"classname" "script_struct" +"angles" "0 0 0" +} +{ +"targetname" "zone_infirmary_roof_spawner" +"script_noteworthy" "mechz_location" +"origin" "3891.93 9622.78 1529.37" +"classname" "script_struct" +"angles" "0 0 0" +} +{ +"targetname" "cellblock_shower_spawner" +"script_noteworthy" "mechz_location" +"origin" "2022.91 9412.14 1144.13" +"classname" "script_struct" +"angles" "0 0 0" +} +{ +"targetname" "cellblock_shower_spawner" +"script_noteworthy" "mechz_location" +"origin" "2048.67 10347.2 1144.13" +"classname" "script_struct" +"angles" "0 0 0" +} +{ +"targetname" "cellblock_shower_spawner" +"script_noteworthy" "mechz_location" +"origin" "1616.31 9571.32 1144.13" +"classname" "script_struct" +"angles" "0 0 0" +} +{ +"targetname" "zone_citadel_shower_spawner" +"script_noteworthy" "mechz_location" +"origin" "1137.45 10067.8 1128.13" +"classname" "script_struct" +"angles" "0 0 0" +} +{ +"targetname" "zone_citadel_spawner" +"script_noteworthy" "mechz_location" +"origin" "780.887 9609.58 1104.92" +"classname" "script_struct" +"angles" "0 0 0" +} +{ +"targetname" "zone_citadel_warden_spawner" +"script_noteworthy" "mechz_location" +"origin" "304.834 8812.09 1128.13" +"classname" "script_struct" +"angles" "0 0 0" +} +{ +"targetname" "zone_warden_office_spawner" +"script_noteworthy" "mechz_location" +"origin" "-512.008 9239.52 1336.13" +"classname" "script_struct" +"angles" "0 0 0" +} +{ +"targetname" "zone_warden_office_spawner" +"script_noteworthy" "mechz_location" +"origin" "-535.189 8655.96 1336.13" +"classname" "script_struct" +"angles" "0 0 0" +} +{ +"targetname" "zone_cellblock_west_warden_spawner" +"script_noteworthy" "mechz_location" +"origin" "-252.103 9304.25 1336.13" +"classname" "script_struct" +"angles" "0 0 0" +} +{ +"targetname" "zone_citadel_stairs_spawner" +"script_noteworthy" "mechz_location" +"origin" "571.418 8622.34 832.125" +"classname" "script_struct" +"angles" "0 0 0" +} +{ +"targetname" "zone_citadel_stairs_spawner" +"script_noteworthy" "mechz_location" +"origin" "437.274 8652.06 448.247" +"classname" "script_struct" +"angles" "0 0 0" +} +{ +"targetname" "zone_citadel_stairs_spawner" +"script_noteworthy" "mechz_location" +"origin" "243.962 8294.38 276.125" +"classname" "script_struct" +"angles" "0 0 0" +} +{ +"targetname" "zone_citadel_basement_spawner" +"script_noteworthy" "mechz_location" +"origin" "24.5956 7542.39 64.125" +"classname" "script_struct" +"angles" "0 0 0" +} +{ +"targetname" "zone_citadel_basement_building_spawner" +"script_noteworthy" "mechz_location" +"origin" "72.0036 7091.88 64.125" +"classname" "script_struct" +"angles" "0 0 0" +} +{ +"targetname" "zone_studio_spawner" +"script_noteworthy" "mechz_location" +"origin" "-558.237 6656.3 64.125" +"classname" "script_struct" +"angles" "0 0 0" +} +{ +"targetname" "zone_studio_spawner" +"script_noteworthy" "mechz_location" +"origin" "112.622 6482.98 64.125" +"classname" "script_struct" +"angles" "0 0 0" +} +{ +"targetname" "zone_dock_spawner" +"script_noteworthy" "mechz_location" +"origin" "322.212 6262.78 45.9728" +"classname" "script_struct" +"angles" "0 0 0" +} +{ +"targetname" "zone_dock_spawner" +"script_noteworthy" "mechz_location" +"origin" "-830.091 6003.34 -56.5154" +"classname" "script_struct" +"angles" "0 0 0" +} +{ +"targetname" "zone_dock_spawner" +"script_noteworthy" "mechz_location" +"origin" "-1195.81 5894.43 -71.875" +"classname" "script_struct" +"angles" "0 0 0" +} +{ +"targetname" "zone_dock_spawner" +"script_noteworthy" "mechz_location" +"origin" "-589.974 5409.08 -71.875" +"classname" "script_struct" +"angles" "0 0 0" +} +{ +"targetname" "zone_dock_gondola_spawner" +"script_noteworthy" "mechz_location" +"origin" "468.387 5891.84 264.125" +"classname" "script_struct" +"angles" "0 0 0" +} +{ +"targetname" "zone_dock_gondola_spawner" +"script_noteworthy" "mechz_location" +"origin" "664.645 6661.54 208.125" +"classname" "script_struct" +"angles" "0 0 0" +} +{ +"targetname" "zone_roof_infirmary_spawner" +"script_noteworthy" "mechz_location" +"origin" "3821.14 9761.51 1704.13" +"classname" "script_struct" +"angles" "0 0 0" +} +{ +"targetname" "zone_roof_spawner" +"script_noteworthy" "mechz_location" +"origin" "3379.65 9782.85 1708.54" +"classname" "script_struct" +"angles" "0 0 0" +} +{ +"targetname" "zone_roof_spawner" +"script_noteworthy" "mechz_location" +"origin" "3261.15 9371.38 1704.13" +"classname" "script_struct" +"angles" "0 0 0" +} +{ +"targetname" "zone_roof_spawner" +"script_noteworthy" "mechz_location" +"origin" "2531.06 9479.62 1704.13" +"classname" "script_struct" +"angles" "0 0 0" +} +{ +"targetname" "zone_roof_spawner" +"script_noteworthy" "mechz_location" +"origin" "2626.65 9840.4 1707.4" +"classname" "script_struct" +"angles" "0 0 0" +} +{ +"targetname" "spawner_golden_gate_bridge" +"script_noteworthy" "mechz_location" +"origin" "-514.8 -3459.53 -8447.88" +"classname" "script_struct" +"angles" "0 0 0" +} +{ +"targetname" "spawner_golden_gate_bridge" +"script_noteworthy" "mechz_location" +"origin" "-517.891 -3843.7 -8447.88" +"classname" "script_struct" +"angles" "0 0 0" +} +{ +"targetname" "spawner_golden_gate_bridge" +"script_noteworthy" "mechz_location" +"origin" "-1738.67 -3596.65 -8447.88" +"classname" "script_struct" +"angles" "0 0 0" } \ No newline at end of file diff --git a/zm_ai_pack/maps/mp/zombies/_zm_ai_avogadro.gsc b/zm_ai_pack/maps/mp/zombies/_zm_ai_avogadro.gsc index 663479b..e8977ae 100644 --- a/zm_ai_pack/maps/mp/zombies/_zm_ai_avogadro.gsc +++ b/zm_ai_pack/maps/mp/zombies/_zm_ai_avogadro.gsc @@ -134,6 +134,7 @@ avogadro_prespawn() self.has_legs = 1; self.no_gib = 1; self.is_avogadro = 1; + self.is_boss = true; self.ignore_enemy_count = 1; recalc_zombie_array(); self.ignore_nuke = 1; diff --git a/zm_ai_pack/maps/mp/zombies/_zm_ai_brutus.gsc b/zm_ai_pack/maps/mp/zombies/_zm_ai_brutus.gsc index b608101..6919c83 100644 --- a/zm_ai_pack/maps/mp/zombies/_zm_ai_brutus.gsc +++ b/zm_ai_pack/maps/mp/zombies/_zm_ai_brutus.gsc @@ -40,8 +40,13 @@ precache() precachestring( &"ZOMBIE_LOCKED_COST_6000" ); flag_init( "brutus_setup_complete" ); setdvar( "zombie_double_wide_checks", 1 ); - registerclientfield( "actor", "helmet_off", 9000, 1, "int" ); - registerclientfield( "actor", "brutus_lock_down", 9000, 1, "int" ); + if ( !isdefined( level.vsmgr_prio_zm_brutus_teargas ) ) + level.vsmgr_prio_overlay_zm_ai_screecher_blur = 50; + + if ( !isdefined( level.custom_brutus_barrier_fx ) ) + level.custom_brutus_barrier_fx = ::precache_default_brutus_barrier_fx; + + [[ level.custom_brutus_barrier_fx ]](); } main() @@ -64,8 +69,6 @@ main() precachestring( &"ZOMBIE_LOCKED_COST_6000" ); flag_init( "brutus_setup_complete" ); setdvar( "zombie_double_wide_checks", 1 ); - //registerclientfield( "actor", "helmet_off", 9000, 1, "int" ); - //registerclientfield( "actor", "brutus_lock_down", 9000, 1, "int" ); if ( !isdefined( level.vsmgr_prio_zm_brutus_teargas ) ) level.vsmgr_prio_overlay_zm_ai_screecher_blur = 50; @@ -379,6 +382,8 @@ brutus_spawn( starting_health, has_helmet, helmet_hits, explosive_dmg_taken, zon self.has_legs = 1; self.ignore_all_poi = 1; self.is_brutus = 1; + self.is_boss = true; + self.no_gib = true; self.ignore_enemy_count = 1; self.instakill_func = ::brutus_instakill_override; self.nuke_damage_func = ::brutus_nuke_override; @@ -413,11 +418,10 @@ brutus_spawn( starting_health, has_helmet, helmet_hits, explosive_dmg_taken, zon spawn_pos = get_random_brutus_spawn_pos( zone_name ); } else + { spawn_pos = get_best_brutus_spawn_pos( zone_name ); + } - spawn_pos = spawnStruct(); - spawn_pos.origin = level.players[ 0 ].origin; - spawn_pos.angles = level.players[ 0 ].angles; if ( !isdefined( spawn_pos ) ) { /# @@ -425,7 +429,6 @@ brutus_spawn( starting_health, has_helmet, helmet_hits, explosive_dmg_taken, zon iprintln( "ERROR: Tried to spawn brutus with no brutus spawn_positions!" ); #/ self delete(); - print( "****BRUTUS DELETED BECAUSE NO SPAWN POS****" ); return; } diff --git a/zm_ai_pack/maps/mp/zombies/_zm_ai_dogs.gsc b/zm_ai_pack/maps/mp/zombies/_zm_ai_dogs.gsc index 2682616..92bb361 100644 --- a/zm_ai_pack/maps/mp/zombies/_zm_ai_dogs.gsc +++ b/zm_ai_pack/maps/mp/zombies/_zm_ai_dogs.gsc @@ -397,6 +397,7 @@ dog_init() self.targetname = "zombie_dog"; self.script_noteworthy = undefined; self.animname = "zombie_dog"; + self.no_gib = true; self.ignoreall = 1; self.ignoreme = 1; self.allowdeath = 1; diff --git a/zm_ai_pack/maps/mp/zombies/_zm_ai_mechz.gsc b/zm_ai_pack/maps/mp/zombies/_zm_ai_mechz.gsc index 452c8a4..1686a19 100644 --- a/zm_ai_pack/maps/mp/zombies/_zm_ai_mechz.gsc +++ b/zm_ai_pack/maps/mp/zombies/_zm_ai_mechz.gsc @@ -51,7 +51,7 @@ register_clientfields() { //registerclientfield( "actor", "mechz_fx", 14000, 12, "int" ); //registerclientfield( "toplayer", "mechz_grab", 14000, 1, "int" ); - if ( getDvar( "mapname" ) != "zm_buried" ) + if ( getDvar( "mapname" ) != "zm_buried" || getDvar( "g_gametype" ) != "zclassic" ) { registerclientfield( "actor", "anim_rate", 14000, 2, "float" ); } @@ -623,6 +623,7 @@ mechz_spawn() self.no_gib = 1; self.ignore_all_poi = 1; self.is_mechz = 1; + self.is_boss = true; self.ignore_enemy_count = 1; self.no_damage_points = 1; self.melee_anim_func = ::melee_anim_func; @@ -631,11 +632,12 @@ mechz_spawn() self.ignore_distance_tracking = true; recalc_zombie_array(); width = 15; + height = 60; if ( level.script == "zm_tomb" ) { width = 20; } - self setphysparams( width, 0, 80 ); + self setphysparams( width, 0, height ); self setcandamage( 0 ); self.zombie_init_done = 1; self notify( "zombie_init_done" ); diff --git a/zm_ai_pack/scripts/zm/zm_ai_pack_mod_main.gsc b/zm_ai_pack/scripts/zm/zm_ai_pack_mod_main.gsc index db6a0e5..9a05332 100644 --- a/zm_ai_pack/scripts/zm/zm_ai_pack_mod_main.gsc +++ b/zm_ai_pack/scripts/zm/zm_ai_pack_mod_main.gsc @@ -18,6 +18,8 @@ main() replace_single_function( "maps/mp/zombies/_zm_weap_slowgun", "can_be_paralyzed", ::can_be_paralyzed_override ); replace_single_function( "maps/mp/zombies/_zm_ai_sloth", "watch_crash_trigger", ::watch_crash_trigger_override ); + + level.script = toLower( getDvar( "mapname" ) ); level.gametype = toLower( getDvar( "g_gametype" ) ); @@ -319,7 +321,7 @@ watch_crash_trigger_override() check_solo_status() { - if ( getnumexpectedplayers() == 1 && ( !sessionmodeisonlinegame() || !sessionmodeisprivate() ) ) + if ( getnumexpectedplayers() == 1 && ( !sessionmodeisonlinegame() || !sessionmodeisprivate() ) && !isDedicated() ) { level.is_forever_solo_game = 1; } diff --git a/zm_ai_pack/scripts/zm/zm_prison/zm_ai_pack_mod_zm_prison_main.gsc b/zm_ai_pack/scripts/zm/zm_prison/zm_ai_pack_mod_zm_prison_main.gsc new file mode 100644 index 0000000..d5f7a63 --- /dev/null +++ b/zm_ai_pack/scripts/zm/zm_prison/zm_ai_pack_mod_zm_prison_main.gsc @@ -0,0 +1,95 @@ +#include maps\mp\zombies\_zm_utility; +#include common_scripts\utility; +#include maps\mp\_utility; + +#include maps\mp\zm_alcatraz_traps; + +main() +{ + level.custom_fan_trap_damage_func = ::fan_trap_damage_override; + level.custom_acid_trap_damage_func = ::acid_trap_damage_override; +} + +zombie_fan_trap_death() +{ + self endon( "death" ); + + if ( !is_true( self.no_gib ) ) + { + self.a.gib_ref = random( array( "guts", "right_arm", "left_arm", "head" ) ); + self thread maps\mp\animscripts\zm_death::do_gib(); + } + + self setclientfield( "fan_trap_blood_fx", 1 ); + self thread stop_fan_trap_blood_fx(); + self dodamage( self.health + 1000, self.origin ); +} + +fan_trap_damage_override( parent ) +{ + self endon( "fan_trap_finished" ); + + for (;;) + { + self waittill( "trigger", ent ); + + if ( isplayer( ent ) ) + ent thread player_fan_trap_damage(); + else + { + if ( is_true( ent.is_boss ) ) + { + ent maps\mp\zombies\_zm_ai_brutus::trap_damage_callback( self ); + return; + } + + if ( !isdefined( ent.marked_for_death ) ) + { + ent.marked_for_death = 1; + ent thread zombie_fan_trap_death(); + } + } + } +} + +zombie_acid_damage() +{ + self endon( "death" ); + self setclientfield( "acid_trap_death_fx", 1 ); + wait( randomfloatrange( 0.25, 2.0 ) ); + + if ( !is_true( self.no_gib ) ) + { + self.a.gib_ref = random( array( "right_arm", "left_arm", "head", "right_leg", "left_leg", "no_legs" ) ); + self thread maps\mp\animscripts\zm_death::do_gib(); + } + + self dodamage( self.health + 1000, self.origin ); +} + +acid_trap_damage_override() +{ + self endon( "acid_trap_finished" ); + + for (;;) + { + self waittill( "trigger", ent ); + + if ( isplayer( ent ) ) + ent thread player_acid_damage( self ); + else + { + if ( is_true( ent.is_boss ) ) + { + ent maps\mp\zombies\_zm_ai_brutus::trap_damage_callback( self ); + return; + } + + if ( !isdefined( ent.marked_for_death ) ) + { + ent.marked_for_death = 1; + ent thread zombie_acid_damage(); + } + } + } +} \ No newline at end of file diff --git a/zm_ai_pack/zone_source/mod.zone b/zm_ai_pack/zone_source/mod.zone index 750e53c..662a019 100644 --- a/zm_ai_pack/zone_source/mod.zone +++ b/zm_ai_pack/zone_source/mod.zone @@ -61,4 +61,7 @@ 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.gsc script,scripts/zm/clientfield_alt_sys.csc -script,scripts/zm/clientfield_alt_sys.gsc \ No newline at end of file +script,scripts/zm/clientfield_alt_sys.gsc + +// Map specific scripts +script,scripts/zm/zm_prison/zm_ai_pack_mod_zm_prison_main.gsc \ No newline at end of file