1
0
mirror of https://github.com/JezuzLizard/BO2-Reimagined.git synced 2025-06-10 23:27:57 -05:00

Mystery Box: decrease weapon pickup time

This commit is contained in:
Jbleezy
2022-01-02 16:22:36 -08:00
parent 2573f87a02
commit 18b0ef282e
4 changed files with 50 additions and 0 deletions

View File

@ -106,6 +106,9 @@
* Increased trigger radius
* Decreased upgraded ammo cost from 4500 to 2500
## Mystery Box
* Decreased weapon pickup time from 12 seconds to 9 seconds
## Perks
* No longer deactivated if the perk machine is powered off

View File

@ -7,6 +7,7 @@
#include scripts/zm/replaced/_zm_playerhealth;
#include scripts/zm/replaced/_zm_utility;
#include scripts/zm/replaced/_zm_weapons;
#include scripts/zm/replaced/_zm_magicbox;
#include scripts/zm/replaced/_zm_powerups;
#include scripts/zm/replaced/_zm_equipment;
#include scripts/zm/replaced/_zm_ai_basic;
@ -21,6 +22,8 @@ main()
replaceFunc(maps/mp/zombies/_zm_utility::is_headshot, scripts/zm/replaced/_zm_utility::is_headshot);
replaceFunc(maps/mp/zombies/_zm_weapons::get_upgraded_ammo_cost, scripts/zm/replaced/_zm_weapons::get_upgraded_ammo_cost);
replaceFunc(maps/mp/zombies/_zm_weapons::makegrenadedudanddestroy, scripts/zm/replaced/_zm_weapons::makegrenadedudanddestroy);
replaceFunc(maps/mp/zombies/_zm_magicbox::treasure_chest_timeout, scripts/zm/replaced/_zm_magicbox::treasure_chest_timeout);
replaceFunc(maps/mp/zombies/_zm_magicbox::timer_til_despawn, scripts/zm/replaced/_zm_magicbox::timer_til_despawn);
replaceFunc(maps/mp/zombies/_zm_powerups::nuke_powerup, scripts/zm/replaced/_zm_powerups::nuke_powerup);
replaceFunc(maps/mp/zombies/_zm_equipment::placed_equipment_think, scripts/zm/replaced/_zm_equipment::placed_equipment_think);
replaceFunc(maps/mp/zombies/_zm_ai_basic::inert_wakeup, scripts/zm/replaced/_zm_ai_basic::inert_wakeup);
@ -146,6 +149,7 @@ post_all_players_spawned()
maps/mp/zombies/_zm::register_player_damage_callback( ::player_damage_override );
level.near_miss = 2; // makes screecher not run away first time on solo
level.magicbox_timeout = 9;
level.equipment_etrap_needs_power = 0;
level.equipment_turret_needs_power = 0;
level.equipment_subwoofer_needs_power = 0;

View File

@ -0,0 +1,23 @@
#include maps\mp\_utility;
#include common_scripts\utility;
#include maps\mp\zombies\_zm_utility;
treasure_chest_timeout()
{
self endon( "user_grabbed_weapon" );
self.zbarrier endon( "box_hacked_respin" );
self.zbarrier endon( "box_hacked_rerespin" );
wait level.magicbox_timeout;
self notify( "trigger", level );
}
timer_til_despawn( v_float )
{
self endon( "kill_weapon_movement" );
self moveto( self.origin - ( v_float * 0.85 ), level.magicbox_timeout, level.magicbox_timeout * 0.5 );
wait level.magicbox_timeout;
if ( isDefined( self ) )
{
self delete();
}
}

View File

@ -0,0 +1,20 @@
#include maps\mp\_utility;
#include common_scripts\utility;
#include maps\mp\zombies\_zm_utility;
init()
{
level.custom_magic_box_timer_til_despawn = ::custom_magic_box_timer_til_despawn;
}
custom_magic_box_timer_til_despawn( magic_box )
{
self endon( "kill_weapon_movement" );
v_float = anglesToForward( magic_box.angles - vectorScale( ( 0, 1, 0 ), 90 ) ) * 40;
self moveto( self.origin - ( v_float * 0.25 ), level.magicbox_timeout, level.magicbox_timeout * 0.5 );
wait level.magicbox_timeout;
if ( isDefined( self ) )
{
self delete();
}
}