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

Mystery Box: moves to new location instantly

This commit is contained in:
Jbleezy
2022-01-02 16:36:45 -08:00
parent f0b7e9e0f3
commit f4a911a793
3 changed files with 47 additions and 0 deletions

View File

@ -108,6 +108,7 @@
## Mystery Box
* Decreased weapon pickup time from 12 seconds to 9 seconds
* Moves to new location instantly
## Perks
* No longer deactivated if the perk machine is powered off

View File

@ -22,6 +22,7 @@ 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_move, scripts/zm/replaced/_zm_magicbox::treasure_chest_move);
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);

View File

@ -2,6 +2,51 @@
#include common_scripts\utility;
#include maps\mp\zombies\_zm_utility;
treasure_chest_move( player_vox )
{
level waittill( "weapon_fly_away_start" );
players = get_players();
array_thread( players, maps/mp/zombies/_zm_magicbox::play_crazi_sound );
if ( isDefined( player_vox ) )
{
player_vox delay_thread( randomintrange( 2, 7 ), maps/mp/zombies/_zm_audio::create_and_play_dialog, "general", "box_move" );
}
level waittill( "weapon_fly_away_end" );
if ( isDefined( self.zbarrier ) )
{
self maps/mp/zombies/_zm_magicbox::hide_chest( 1 );
}
wait 0.1;
if ( level.zombie_vars[ "zombie_powerup_fire_sale_on" ] == 1 && self [[ level._zombiemode_check_firesale_loc_valid_func ]]() )
{
current_sale_time = level.zombie_vars[ "zombie_powerup_fire_sale_time" ];
wait_network_frame();
self thread maps/mp/zombies/_zm_magicbox::fire_sale_fix();
level.zombie_vars[ "zombie_powerup_fire_sale_time" ] = current_sale_time;
while ( level.zombie_vars[ "zombie_powerup_fire_sale_time" ] > 0 )
{
wait 0.1;
}
}
level.verify_chest = 0;
if ( isDefined( level._zombiemode_custom_box_move_logic ) )
{
[[ level._zombiemode_custom_box_move_logic ]]();
}
else
{
maps/mp/zombies/_zm_magicbox::default_box_move_logic();
}
if ( isDefined( level.chests[ level.chest_index ].box_hacks[ "summon_box" ] ) )
{
level.chests[ level.chest_index ] [[ level.chests[ level.chest_index ].box_hacks[ "summon_box" ] ]]( 0 );
}
playfx( level._effect[ "poltergeist" ], level.chests[ level.chest_index ].zbarrier.origin );
level.chests[ level.chest_index ] maps/mp/zombies/_zm_magicbox::show_chest();
flag_clear( "moving_chest_now" );
self.zbarrier.chest_moving = 0;
}
treasure_chest_timeout()
{
self endon( "user_grabbed_weapon" );