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

Containment: zombies in zone die when it moves

This commit is contained in:
Jbleezy
2023-03-09 19:39:52 -08:00
parent 525515fa3e
commit c62f0ed967
2 changed files with 11 additions and 18 deletions

View File

@ -557,6 +557,7 @@
* Contested if both teams have the same amount of players alive in the containment zone * Contested if both teams have the same amount of players alive in the containment zone
* Both teams gain score at half rate when contested * Both teams gain score at half rate when contested
* Zombies only go after players in the containment zone * Zombies only go after players in the containment zone
* Zombies in the containment zone die when it moves
* Players in the containment zone gain 50 points when their team gains score * Players in the containment zone gain 50 points when their team gains score
* Players respawn after being down for 10 seconds * Players respawn after being down for 10 seconds
* Players retain perks * Players retain perks

View File

@ -2505,11 +2505,11 @@ containment_think()
wait 10; wait 10;
containment_zones = containment_get_zones(); containment_zones = containment_get_zones();
i = 0; ind = 0;
while(1) while(1)
{ {
zone_name = containment_zones[i]; zone_name = containment_zones[ind];
zone_display_name = scripts\zm\_zm_reimagined::get_zone_display_name(zone_name); zone_display_name = scripts\zm\_zm_reimagined::get_zone_display_name(zone_name);
zone = level.zones[zone_name]; zone = level.zones[zone_name];
@ -2801,24 +2801,16 @@ containment_think()
wait 0.05; wait 0.05;
} }
level.containment_zone_hud setText(""); zombies = get_round_enemy_array();
level.containment_time_hud setText(""); if (isDefined(zombies))
players = get_players();
foreach(player in players)
{ {
if(is_player_valid(player)) for (i = 0; i < zombies.size; i++)
{ {
if(!meat_stink_player && !is_true(player.spawn_protection) && !is_true(player.revive_protection)) if (zombies[i] get_current_zone() == zone_name)
{ {
player.ignoreme = 0; zombies[i] dodamage(zombies[i].health + 666, zombies[i].origin);
} }
} }
if(isDefined(player.obj_waypoint))
{
player.obj_waypoint.alpha = 0;
}
} }
spawn_points = maps\mp\gametypes_zm\_zm_gametype::get_player_spawns_for_gametype(); spawn_points = maps\mp\gametypes_zm\_zm_gametype::get_player_spawns_for_gametype();
@ -2830,11 +2822,11 @@ containment_think()
} }
} }
i++; ind++;
if(i >= containment_zones.size) if(ind >= containment_zones.size)
{ {
i = 0; ind = 0;
} }
} }
} }