Skip to content

Survival invasion (regresson) fixes and new CVar: "sv_respawninsurvivalinvasion"

By my own mistake, survival invasion allows (dead) spectators to join at the end of a wave with replenished lives, thinking that this was always possible. This actually isn't supposed to happen and it's a regression that existed since 3.1, caused by 689fe48904f3

However, the current behaviour of reviving dead spectators and allowing true spectators to join the game at the end of a wave adds a new kind of dynamic to survival invasion. This can be useful for maps or mods where even a single wave can be extremely difficult or last for a long time, and it keeps players engaged since they don't have to wait a long time just to re-join, which really isn't fun, especially when there's no wave limit.

So while I fixed the regression, I also added a new CVar (sv_respawninsurvivalinvasion) to re-enable the current "regressed" behaviour. Now, all players' lives will be replenished at the end of a wave when this CVar is enabled.

I also addressed a few other similar issues:

  1. If a player dies while a wave's in progress and tries to stay dead until the wave is complete, they'll still lose a life. This way, they can't cheat by waiting to respawn at a period when they won't lose a life.
  2. Players could still turn into a dead spectator if they died with one life left and a wave was complete in survival invasion.

This addresses some of the feedback reported in https://zandronum.com/tracker/view.php?id=4283.

Edited by Adam Kaminski

Merge request reports