Server: Smarter branching in Round_Core

This commit is contained in:
moto 2022-07-02 08:54:04 -04:00
parent 92f38d906a
commit 469c6fcaa0

View file

@ -286,49 +286,44 @@ void() NewRound =
zaps = find(zaps, classname, "zapper_switch"); zaps = find(zaps, classname, "zapper_switch");
} }
} }
void() Round_Core = void() Round_Core =
{ {
if (game_over) if (game_over)
return; return;
if (round_changetime <= (time + 2) && !rounds && round_changetime) { if (round_changetime) {
if (round_changetime <= (time + 2)) {
if (!rounds)
rounds_change = 2; rounds_change = 2;
} else
if (round_changetime <= (time + 2) && rounds && round_changetime) {
rounds_change = 5; rounds_change = 5;
} }
}
if (blink_return && blink_return < time && rounds_change == 6) if (blink_return && blink_return < time) {
{ if (rounds_change == 6) {
blink_return = time + 3; blink_return = time + 3;
rounds_change = 7; rounds_change = 7;
} } else {
if (blink_return && blink_return < time && rounds_change == 7)
{
blink_return = 0; blink_return = 0;
rounds_change = 0; rounds_change = 0;
} }
if (round_changetime >= time) }
return;
if (round_changetime)
{
roundtype = 1;
if (round_changetime < time && round_changetime != 0) {
roundtype = 1;
NewRound(); NewRound();
return; return;
} } else if (round_changetime != 0) return;
if (Total_Zombies > Current_Zombies && spawn_time < time)
{ if (Total_Zombies > Current_Zombies && spawn_time < time) {
Spawn_Enemy(); Spawn_Enemy();
} }
if (Remaining_Zombies < 1 && !Delay_Time)
{ if (Remaining_Zombies < 1 && !Delay_Time) {
Delay_Time = time + 2; Delay_Time = time + 2;
rounds_change = 3; rounds_change = 3;
} } else if (Delay_Time && Delay_Time < time) {
else if (Delay_Time && Delay_Time < time)
{
Delay_Time = 0; Delay_Time = 0;
EndRound(); EndRound();
} }