1
0
mirror of https://github.com/JezuzLizard/BO2-Reimagined.git synced 2025-06-20 20:20:30 -05:00

Vulture-Aid: stink areas no longer activate while the player is standing

This commit is contained in:
Jbleezy
2023-03-24 16:31:28 -07:00
parent 116c058726
commit 84c255f2dc
4 changed files with 30 additions and 61 deletions

View File

@ -292,7 +292,7 @@
* Removed cooldown after being used multiple times in a row
### Vulture-Aid
* Stink areas no longer activate while the player is moving
* Stink areas no longer activate while the player is standing
## Pack-a-Punch
* Decreased weapon pickup time from 15 seconds to 12 seconds

View File

@ -189,8 +189,6 @@ onplayerspawned()
self thread electric_cherry_unlimited();
self thread vulture_disable_stink_while_standing();
//self.score = 100000;
//maps\mp\zombies\_zm_perks::give_perk( "specialty_armorvest", 0 );
//self GiveWeapon("dsr50_zm");
@ -4130,62 +4128,6 @@ zone_changes()
}
}
vulture_disable_stink_while_standing()
{
self endon( "disconnect" );
if(!(is_classic() && level.scr_zm_map_start_location == "processing"))
{
return;
}
while(!isDefined(self.perk_vulture))
{
wait 0.05;
}
while(1)
{
if (!self.perk_vulture.active)
{
wait 0.05;
continue;
}
self.perk_vulture.is_in_zombie_stink = 1;
self.perk_vulture.stink_time_entered = undefined;
player_in_zombie_stink = 0;
close_points = arraysort( level.perk_vulture.zombie_stink_array, self.origin, 1, 300 );
if ( close_points.size > 0 )
{
if(isDefined(level._is_player_in_zombie_stink))
{
player_in_zombie_stink = self [[level._is_player_in_zombie_stink]]( close_points );
}
}
if (player_in_zombie_stink)
{
vel = self GetVelocity();
magnitude = sqrt((vel[0] * vel[0]) + (vel[1] * vel[1]) + (vel[2] * vel[2]));
if (magnitude < 125)
{
self.perk_vulture.is_in_zombie_stink = 0;
wait 0.25;
while (self.vulture_stink_value > 0)
{
wait 0.05;
}
}
}
wait 0.05;
}
}
destroy_on_intermission()
{
self endon("death");

View File

@ -0,0 +1,26 @@
#include common_scripts\utility;
#include maps\mp\_utility;
#include maps\mp\zombies\_zm_utility;
#include maps\mp\zombies\_zm_perks;
#include maps\mp\_visionset_mgr;
#include maps\mp\zombies\_zm_spawner;
#include maps\mp\zombies\_zm_laststand;
#include maps\mp\zombies\_zm_audio;
#include maps\mp\zombies\_zm_zonemgr;
#include maps\mp\zombies\_zm_equipment;
#include maps\mp\zombies\_zm_score;
#include maps\mp\zombies\_zm_ai_basic;
#include maps\mp\zombies\_zm_perk_vulture;
_is_player_in_zombie_stink( a_points )
{
b_is_in_stink = 0;
for ( i = 0; i < a_points.size; i++ )
{
if ( distancesquared( a_points[i].origin, self.origin ) < 4900 && self getStance() != "stand" )
b_is_in_stink = 1;
}
return b_is_in_stink;
}

View File

@ -7,9 +7,10 @@
#include scripts\zm\replaced\_zm_equip_subwoofer;
#include scripts\zm\replaced\_zm_equip_springpad;
#include scripts\zm\replaced\_zm_equip_headchopper;
#include scripts\zm\replaced\_zm_perk_vulture;
#include scripts\zm\replaced\_zm_weap_slowgun;
#include scripts\zm\replaced\_zm_banking;
#include scripts\zm\replaced\_zm_weapon_locker;
#include scripts\zm\replaced\_zm_weap_slowgun;
main()
{
@ -24,6 +25,7 @@ main()
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_perk_vulture::_is_player_in_zombie_stink, scripts\zm\replaced\_zm_perk_vulture::_is_player_in_zombie_stink);
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);
replaceFunc(maps\mp\zombies\_zm_weap_slowgun::watch_reset_anim_rate, scripts\zm\replaced\_zm_weap_slowgun::watch_reset_anim_rate);
@ -38,7 +40,6 @@ init()
{
level.zombie_init_done = ::zombie_init_done;
level.special_weapon_magicbox_check = ::buried_special_weapon_magicbox_check;
level._is_player_in_zombie_stink = maps\mp\zombies\_zm_perk_vulture::_is_player_in_zombie_stink;
if(is_gametype_active("zgrief"))
{