From 3dd8a62c118a8ca3cda81d2a6afc9eb81a5f355b Mon Sep 17 00:00:00 2001 From: Jbleezy Date: Wed, 22 Mar 2023 21:55:08 -0700 Subject: [PATCH] Head Chopper changes --- README.md | 4 +++ scripts/zm/replaced/_zm_equip_headchopper.gsc | 31 ++++++++++++------- scripts/zm/zm_buried/zm_buried_reimagined.gsc | 1 + 3 files changed, 25 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 610ce47d..7b354d90 100644 --- a/README.md +++ b/README.md @@ -371,6 +371,10 @@ ### Head Chopper * No longer gets destroyed from kills * Gets destroyed after activating 15 times +* Does multiple swings when player activates +* No longer deals damage during retract animations +* Changed player head chop damage to 50 (normally instantly kills without Juggernog or deals 15 damage with Juggernog) +* Changed player body chop damage to 25 (normally deals 75 damage to torso or 37 damage to feet) ### Maxis Drone * Added hint strings for purchased, can only be one, and cooling down diff --git a/scripts/zm/replaced/_zm_equip_headchopper.gsc b/scripts/zm/replaced/_zm_equip_headchopper.gsc index af98eb2b..99dc0f6c 100644 --- a/scripts/zm/replaced/_zm_equip_headchopper.gsc +++ b/scripts/zm/replaced/_zm_equip_headchopper.gsc @@ -13,6 +13,18 @@ #include maps\mp\animscripts\zm_run; #include maps\mp\zombies\_zm_audio; +#using_animtree("zombie_headchopper"); + +init_anim_slice_times() +{ + level.headchopper_slice_times = []; + slice_times = getnotetracktimes( %o_zmb_chopper_slice_slow, "slice" ); + animlength = getanimlength( %o_zmb_chopper_slice_slow ); + + foreach ( frac in slice_times ) + level.headchopper_slice_times[level.headchopper_slice_times.size] = animlength * frac; +} + headchopperthink( weapon, electricradius, armed ) { self endon( "death" ); @@ -60,7 +72,7 @@ headchopperthink( weapon, electricradius, armed ) while ( isdefined( is_slicing ) && is_slicing ) { - weapon notify( "chop", weapon.zombies_only ); + weapon notify( "chop", 1 ); weapon.is_armed = 0; weapon.zombies_only = 1; @@ -117,17 +129,14 @@ headchopperattack( weapon, ent ) if ( isplayer( ent ) ) { - if ( isdefined( weapon.deployed_time ) && gettime() - weapon.deployed_time <= 2000 ) - return; - - if ( isdefined( is_headchop ) && is_headchop && !ent hasperk( "specialty_armorvest" ) ) - ent dodamage( ent.health, weapon.origin ); - else if ( isdefined( is_torsochop ) && is_torsochop ) - ent dodamage( 50, weapon.origin ); - else if ( isdefined( is_footchop ) && is_footchop ) - ent dodamage( 25, weapon.origin ); + if ( isdefined( is_headchop ) && is_headchop ) + { + radiusdamage( ent.origin + (0, 0, 5), 10, 50, 50, weapon, "MOD_MELEE" ); + } else - ent dodamage( 10, weapon.origin ); + { + radiusdamage( ent.origin + (0, 0, 5), 10, 25, 25, weapon, "MOD_MELEE" ); + } } else { diff --git a/scripts/zm/zm_buried/zm_buried_reimagined.gsc b/scripts/zm/zm_buried/zm_buried_reimagined.gsc index 1f5fd9af..23d10d9a 100644 --- a/scripts/zm/zm_buried/zm_buried_reimagined.gsc +++ b/scripts/zm/zm_buried/zm_buried_reimagined.gsc @@ -22,6 +22,7 @@ main() replaceFunc(maps\mp\zombies\_zm_equip_subwoofer::startsubwooferdecay, scripts\zm\replaced\_zm_equip_subwoofer::startsubwooferdecay); replaceFunc(maps\mp\zombies\_zm_equip_subwoofer::subwoofer_network_choke, scripts\zm\replaced\_zm_equip_subwoofer::subwoofer_network_choke); replaceFunc(maps\mp\zombies\_zm_equip_springpad::springpadthink, scripts\zm\replaced\_zm_equip_springpad::springpadthink); + replaceFunc(maps\mp\zombies\_zm_equip_headchopper::init_anim_slice_times, scripts\zm\replaced\_zm_equip_headchopper::init_anim_slice_times); replaceFunc(maps\mp\zombies\_zm_equip_headchopper::headchopperthink, scripts\zm\replaced\_zm_equip_headchopper::headchopperthink); replaceFunc(maps\mp\zombies\_zm_weap_slowgun::init, scripts\zm\replaced\_zm_weap_slowgun::init); replaceFunc(maps\mp\zombies\_zm_weap_slowgun::zombie_paralyzed, scripts\zm\replaced\_zm_weap_slowgun::zombie_paralyzed);