mirror of
https://github.com/JezuzLizard/BO2-Reimagined.git
synced 2025-06-10 15:17:57 -05:00
Ghosts: check for free perk powerup properly
This commit is contained in:
29
scripts/zm/replaced/_zm_ai_ghost.gsc
Normal file
29
scripts/zm/replaced/_zm_ai_ghost.gsc
Normal file
@ -0,0 +1,29 @@
|
||||
#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_ghost_ffotd;
|
||||
#include maps\mp\zombies\_zm_ai_ghost;
|
||||
#include maps\mp\zombies\_zm_spawner;
|
||||
#include maps\mp\zombies\_zm_weap_slowgun;
|
||||
#include maps\mp\animscripts\zm_shared;
|
||||
#include maps\mp\zombies\_zm_stats;
|
||||
#include maps\mp\zombies\_zm_score;
|
||||
#include maps\mp\zombies\_zm_laststand;
|
||||
#include maps\mp\zombies\_zm_weap_time_bomb;
|
||||
#include maps\mp\zombies\_zm_powerups;
|
||||
#include maps\mp\zombies\_zm_ai_basic;
|
||||
|
||||
should_last_ghost_drop_powerup()
|
||||
{
|
||||
if ( flag( "time_bomb_restore_active" ) )
|
||||
return false;
|
||||
|
||||
if ( !isdefined( level.ghost_round_last_ghost_origin ) )
|
||||
return false;
|
||||
|
||||
if ( !is_true( level.ghost_round_no_damage ) )
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
@ -12,6 +12,7 @@
|
||||
#include scripts\zm\replaced\zm_buried_sq_tpo;
|
||||
#include scripts\zm\replaced\zm_buried_sq_ip;
|
||||
#include scripts\zm\replaced\zm_buried_sq_ows;
|
||||
#include scripts\zm\replaced\_zm_ai_ghost;
|
||||
#include scripts\zm\replaced\_zm_ai_sloth;
|
||||
#include scripts\zm\replaced\_zm_buildables_pooled;
|
||||
#include scripts\zm\replaced\_zm_equip_subwoofer;
|
||||
@ -42,6 +43,7 @@ main()
|
||||
replaceFunc(maps\mp\zm_buried_sq_tpo::init, scripts\zm\replaced\zm_buried_sq_tpo::init);
|
||||
replaceFunc(maps\mp\zm_buried_sq_ip::init, scripts\zm\replaced\zm_buried_sq_ip::init);
|
||||
replaceFunc(maps\mp\zm_buried_sq_ows::ows_targets_start, scripts\zm\replaced\zm_buried_sq_ows::ows_targets_start);
|
||||
replaceFunc(maps\mp\zombies\_zm_ai_ghost::should_last_ghost_drop_powerup, scripts\zm\replaced\_zm_ai_ghost::should_last_ghost_drop_powerup);
|
||||
replaceFunc(maps\mp\zombies\_zm_ai_sloth::sloth_init_start_funcs, scripts\zm\replaced\_zm_ai_sloth::sloth_init_start_funcs);
|
||||
replaceFunc(maps\mp\zombies\_zm_ai_sloth::sloth_init_update_funcs, scripts\zm\replaced\_zm_ai_sloth::sloth_init_update_funcs);
|
||||
replaceFunc(maps\mp\zombies\_zm_ai_sloth::sloth_check_ragdolls, scripts\zm\replaced\_zm_ai_sloth::sloth_check_ragdolls);
|
||||
@ -367,16 +369,13 @@ disable_ghost_free_perk()
|
||||
{
|
||||
level endon( "ghost_round_end" );
|
||||
|
||||
level.ghost_round_no_damage = 1;
|
||||
|
||||
flag_wait( "spawn_ghosts" );
|
||||
|
||||
level waittill_any("ghost_drained_player", "ghost_damaged_player");
|
||||
|
||||
while (!isDefined(level.ghost_round_last_ghost_origin))
|
||||
{
|
||||
wait 0.05;
|
||||
}
|
||||
|
||||
level.ghost_round_last_ghost_origin = undefined;
|
||||
level.ghost_round_no_damage = 0;
|
||||
|
||||
flag_waitopen( "spawn_ghosts" );
|
||||
}
|
||||
|
Reference in New Issue
Block a user