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

Buried: ghosts no longer spawn and go after players not in the Mansion during a ghost round

This commit is contained in:
Jbleezy
2023-05-02 13:59:42 -07:00
parent eb916d078b
commit f62e0b0645
3 changed files with 81 additions and 0 deletions

View File

@ -673,6 +673,7 @@
* Drawing weapons no longer gives points
* Arthur barricades are buyable debris
* Arthur can be purchased to feed him candy and make him run around and kill zombies for 30 seconds
* Ghosts no longer spawn and go after players not in the Mansion during a ghost round
* Ghosts no longer drop free perk powerup if any player gets damaged by the ghosts
* Fountain portal automatically active
* Players no longer take fall damage after using the fountain teleporter

View File

@ -14,6 +14,85 @@
#include maps\mp\zombies\_zm_powerups;
#include maps\mp\zombies\_zm_ai_basic;
ghost_zone_spawning_think()
{
level endon( "intermission" );
if ( isdefined( level.intermission ) && level.intermission )
return;
if ( !isdefined( level.female_ghost_spawner ) )
{
return;
}
while ( true )
{
if ( level.zombie_ghost_count >= level.zombie_ai_limit_ghost )
{
wait 0.1;
continue;
}
valid_player_count = 0;
valid_players = [];
while ( valid_player_count < 1 )
{
players = getplayers();
valid_player_count = 0;
foreach ( player in players )
{
if ( is_player_valid( player ) && !is_player_fully_claimed( player ) )
{
if ( isdefined( player.is_in_ghost_zone ) && player.is_in_ghost_zone )
{
valid_player_count++;
valid_players[valid_players.size] = player;
}
}
}
wait 0.1;
}
valid_players = array_randomize( valid_players );
spawn_point = get_best_spawn_point( valid_players[0] );
if ( !isdefined( spawn_point ) )
{
wait 0.1;
continue;
}
ghost_ai = undefined;
if ( isdefined( level.female_ghost_spawner ) )
ghost_ai = spawn_zombie( level.female_ghost_spawner, level.female_ghost_spawner.targetname, spawn_point );
else
{
return;
}
if ( isdefined( ghost_ai ) )
{
ghost_ai setclientfield( "ghost_fx", 3 );
ghost_ai.spawn_point = spawn_point;
ghost_ai.is_ghost = 1;
ghost_ai.is_spawned_in_ghost_zone = 1;
ghost_ai.find_target = 1;
level.zombie_ghost_count++;
}
else
{
return;
}
wait 0.1;
}
}
should_last_ghost_drop_powerup()
{
if ( flag( "time_bomb_restore_active" ) )

View File

@ -46,6 +46,7 @@ main()
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\zm_buried_distance_tracking::delete_zombie_noone_looking, scripts\zm\replaced\zm_buried_distance_tracking::delete_zombie_noone_looking);
replaceFunc(maps\mp\zombies\_zm_ai_ghost::ghost_zone_spawning_think, scripts\zm\replaced\_zm_ai_ghost::ghost_zone_spawning_think);
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);