diff --git a/README.md b/README.md index 85f22bfb..1456520c 100644 --- a/README.md +++ b/README.md @@ -80,6 +80,9 @@ * All body shot kills award 50 points * 4 round and 5 round special rounds happen more equally +### Avogadro +* Decreased minimum distance away from players to be able to attack + ### Denizens * Changed max amount that can be spawned at once from 2 total to 1 per player in the fog * Changed spawn rate to 5 seconds (normally same spawn rate as zombies) diff --git a/scripts/zm/replaced/_zm_ai_avogadro.gsc b/scripts/zm/replaced/_zm_ai_avogadro.gsc new file mode 100644 index 00000000..3c5bcb1e --- /dev/null +++ b/scripts/zm/replaced/_zm_ai_avogadro.gsc @@ -0,0 +1,46 @@ +#include common_scripts\utility; +#include maps\mp\_utility; +#include maps\mp\zombies\_zm_utility; +#include maps\mp\animscripts\zm_utility; +#include maps\mp\zombies\_zm_ai_avogadro; +#include maps\mp\_visionset_mgr; +#include maps\mp\zombies\_zm; +#include maps\mp\zombies\_zm_spawner; +#include maps\mp\zombies\_zm_ai_basic; +#include maps\mp\zm_transit_bus; +#include maps\mp\animscripts\zm_shared; +#include maps\mp\zombies\_zm_zonemgr; +#include maps\mp\zombies\_zm_laststand; +#include maps\mp\zombies\_zm_stats; +#include maps\mp\zombies\_zm_weap_riotshield; + +check_range_attack() +{ + enemy = self.favoriteenemy; + + if ( isdefined( enemy ) ) + { + vec_enemy = enemy.origin - self.origin; + dist_sq = lengthsquared( vec_enemy ); + + if ( dist_sq > 4096 && dist_sq < 360000 ) + { + vec_facing = anglestoforward( self.angles ); + norm_facing = vectornormalize( vec_facing ); + norm_enemy = vectornormalize( vec_enemy ); + dot = vectordot( norm_facing, norm_enemy ); + + if ( dot > 0.99 ) + { + enemy_eye_pos = enemy geteye(); + eye_pos = self geteye(); + passed = bullettracepassed( eye_pos, enemy_eye_pos, 0, undefined ); + + if ( passed ) + return true; + } + } + } + + return false; +} \ No newline at end of file diff --git a/scripts/zm/zm_transit/zm_transit_reimagined.gsc b/scripts/zm/zm_transit/zm_transit_reimagined.gsc index b6194c78..2c6dd98a 100644 --- a/scripts/zm/zm_transit/zm_transit_reimagined.gsc +++ b/scripts/zm/zm_transit/zm_transit_reimagined.gsc @@ -9,6 +9,7 @@ #include scripts\zm\replaced\zm_transit_ai_screecher; #include scripts\zm\replaced\zm_transit_bus; #include scripts\zm\replaced\_zm_riotshield; +#include scripts\zm\replaced\_zm_ai_avogadro; #include scripts\zm\replaced\_zm_ai_screecher; #include scripts\zm\replaced\_zm_weap_riotshield; #include scripts\zm\replaced\_zm_weap_jetgun; @@ -35,6 +36,7 @@ main() replaceFunc(maps\mp\zm_transit_ai_screecher::player_wait_land, scripts\zm\replaced\zm_transit_ai_screecher::player_wait_land); replaceFunc(maps\mp\zm_transit_bus::bussetup, scripts\zm\replaced\zm_transit_bus::bussetup); replaceFunc(maps\mp\zm_transit_bus::busscheduleadd, scripts\zm\replaced\zm_transit_bus::busscheduleadd); + replaceFunc(maps\mp\zombies\_zm_ai_avogadro::check_range_attack, scripts\zm\replaced\_zm_ai_avogadro::check_range_attack); replaceFunc(maps\mp\zombies\_zm_ai_screecher::screecher_spawning_logic, scripts\zm\replaced\_zm_ai_screecher::screecher_spawning_logic); replaceFunc(maps\mp\zombies\_zm_ai_screecher::screecher_melee_damage, scripts\zm\replaced\_zm_ai_screecher::screecher_melee_damage); replaceFunc(maps\mp\zombies\_zm_ai_screecher::screecher_detach, scripts\zm\replaced\_zm_ai_screecher::screecher_detach);