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

Containment: Meat on player functions correctly

This commit is contained in:
Jbleezy
2022-01-30 18:32:15 -08:00
parent bd378fb8d1
commit 41b8ae3744
2 changed files with 20 additions and 5 deletions

View File

@ -479,6 +479,7 @@
### Containment ### Containment
* Gain score by being the team with the most alive players in the containment zone * Gain score by being the team with the most alive players in the containment zone
* First team to gain 250 score wins the game * First team to gain 250 score wins the game
* Both teams gain score if both teams have the same amount of alive players in the containment zone
* Zombies only go after players in the containment zone * Zombies only go after players in the containment zone
* Players respawn after being down for 10 seconds * Players respawn after being down for 10 seconds
* Players retain perks * Players retain perks

View File

@ -2222,11 +2222,21 @@ containment_think()
start_time = getTime(); start_time = getTime();
while((getTime() - start_time) <= (level.containment_time * 1000)) while((getTime() - start_time) <= (level.containment_time * 1000))
{ {
players = get_players();
in_containment_zone = []; in_containment_zone = [];
in_containment_zone["axis"] = 0; in_containment_zone["axis"] = 0;
in_containment_zone["allies"] = 0; in_containment_zone["allies"] = 0;
players = get_players(); meat_stink_player = 0;
foreach(player in players)
{
if(isDefined(player.meat_stink_3p))
{
meat_stink_player = 1;
break;
}
}
foreach(player in players) foreach(player in players)
{ {
if(!isDefined(player.containment_waypoint)) if(!isDefined(player.containment_waypoint))
@ -2238,7 +2248,7 @@ containment_think()
{ {
if(is_player_valid(player)) if(is_player_valid(player))
{ {
if(!is_true(player.spawn_protection) && !is_true(player.revive_protection)) if(!meat_stink_player && !is_true(player.spawn_protection) && !is_true(player.revive_protection))
{ {
player.ignoreme = 0; player.ignoreme = 0;
} }
@ -2269,7 +2279,11 @@ containment_think()
{ {
if(is_player_valid(player)) if(is_player_valid(player))
{ {
player.ignoreme = 1; if(!meat_stink_player)
{
player.ignoreme = 1;
}
player.containment_waypoint.alpha = 0.5; player.containment_waypoint.alpha = 0.5;
} }
else else
@ -2352,7 +2366,7 @@ containment_think()
{ {
if(is_player_valid(player)) if(is_player_valid(player))
{ {
if(!is_true(player.spawn_protection) && !is_true(player.revive_protection)) if(!meat_stink_player && !is_true(player.spawn_protection) && !is_true(player.revive_protection))
{ {
player.ignoreme = 0; player.ignoreme = 0;
} }
@ -2406,7 +2420,7 @@ containment_think()
{ {
if(is_player_valid(player)) if(is_player_valid(player))
{ {
if(!is_true(player.spawn_protection) && !is_true(player.revive_protection)) if(!meat_stink_player && !is_true(player.spawn_protection) && !is_true(player.revive_protection))
{ {
player.ignoreme = 0; player.ignoreme = 0;
} }