1
0
mirror of https://github.com/JezuzLizard/BO2-Reimagined.git synced 2025-06-11 23:57:59 -05:00

Containment: both teams don't gain score during final score contest

This commit is contained in:
Jbleezy
2023-05-04 02:07:20 -07:00
parent ba61e84d16
commit c9680fc60e
2 changed files with 19 additions and 30 deletions

View File

@ -830,6 +830,7 @@
* Gain 250 score to win the game * Gain 250 score to win the game
* 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
* Final score has to be gained uncontested
* 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 * 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

View File

@ -2831,17 +2831,11 @@ containment_think()
player thread show_grief_hud_msg("Containment zone contested!"); player thread show_grief_hud_msg("Containment zone contested!");
} }
} }
else
{
if((level.grief_score["A"] + 1) >= get_gamemode_winning_score())
{
held_time["axis"] = getTime();
}
if((level.grief_score["B"] + 1) >= get_gamemode_winning_score()) if((level.grief_score["A"] + 1) >= get_gamemode_winning_score() || (level.grief_score["B"] + 1) >= get_gamemode_winning_score())
{ {
held_time["allies"] = getTime(); held_time["axis"] = undefined;
} held_time["allies"] = undefined;
} }
} }
else if(in_containment_zone["axis"].size > in_containment_zone["allies"].size) else if(in_containment_zone["axis"].size > in_containment_zone["allies"].size)
@ -2861,7 +2855,7 @@ containment_think()
if(held_prev != "axis") if(held_prev != "axis")
{ {
obj_time = 1000; obj_time = 1000;
if(held_prev != "cont") if(!isDefined(held_time["axis"]))
{ {
held_time["axis"] = getTime(); held_time["axis"] = getTime();
} }
@ -2898,7 +2892,7 @@ containment_think()
if(held_prev != "allies") if(held_prev != "allies")
{ {
obj_time = 1000; obj_time = 1000;
if(held_prev != "cont") if(!isDefined(held_time["allies"]))
{ {
held_time["allies"] = getTime(); held_time["allies"] = getTime();
} }
@ -2952,17 +2946,14 @@ containment_think()
{ {
held_time["axis"] = getTime(); held_time["axis"] = getTime();
if((held_prev != "cont") || ((level.grief_score["A"] + 1) < get_gamemode_winning_score())) foreach(player in in_containment_zone["axis"])
{ {
foreach(player in in_containment_zone["axis"]) score = 50 * maps\mp\zombies\_zm_score::get_points_multiplier(player);
{ player maps\mp\zombies\_zm_score::add_to_player_score(score);
score = 50 * maps\mp\zombies\_zm_score::get_points_multiplier(player); player.captures++;
player maps\mp\zombies\_zm_score::add_to_player_score(score);
player.captures++;
}
increment_score("axis", undefined, !isDefined(held_time["allies"]));
} }
increment_score("axis", undefined, !isDefined(held_time["allies"]));
} }
} }
@ -2972,17 +2963,14 @@ containment_think()
{ {
held_time["allies"] = getTime(); held_time["allies"] = getTime();
if((held_prev != "cont") || ((level.grief_score["B"] + 1) < get_gamemode_winning_score())) foreach(player in in_containment_zone["allies"])
{ {
foreach(player in in_containment_zone["allies"]) score = 50 * maps\mp\zombies\_zm_score::get_points_multiplier(player);
{ player maps\mp\zombies\_zm_score::add_to_player_score(score);
score = 50 * maps\mp\zombies\_zm_score::get_points_multiplier(player); player.captures++;
player maps\mp\zombies\_zm_score::add_to_player_score(score);
player.captures++;
}
increment_score("allies", undefined, !isDefined(held_time["axis"]));
} }
increment_score("allies", undefined, !isDefined(held_time["axis"]));
} }
} }