Skip to content

Miscellaneous player lives changes and fixes

Adam Kaminski requested to merge topic/default/player-lives-changes into branch/default

A few fixes or changes to how player lives are handled:

  • When the level changes, everyone's lives are now fully replenished after the change instead of before (addresses https://zandronum.com/tracker/view.php?id=4313).
  • On intermission screens, if the game was already in progress, the lives column on the scoreboard now treats dead players (i.e. not dead spectators) as though they lost an extra life (e.g. in LMS, if a dead player was on their last life, then it will show that they have zero lives left).
  • Team headers don't show how many players are still alive on intermission screens anymore, just the total player count.
  • In survival invasion, players can no longer cheat and refill lost lives by dying during the win sequence and waiting until the countdown begins (addresses https://zandronum.com/tracker/view.php?id=4283). Furthermore, players that stay dead at the end of a countdown will respawn and not lose a life when the wave begins (addresses https://zandronum.com/tracker/view.php?id=4284), nor will they lose a life when they respawn when a wave is complete (addresses https://zandronum.com/tracker/view.php?id=2896).

Note: the names of the functions GAMEMODE_RespawnDeadSpectators and GAMEMODE_RespawnDeadSpectatorsAndPopQueue were misleading. It suggests that they respawn only dead spectators, but they actually respawn dead players that are still in the game too. I renamed these functions to GAMEMODE_RespawnDeadPlayers and GAMEMODE_RespawnDeadPlayersAndPopQueue respectively, and added two optional parameters so that it's possible to specify different player states to use for dead spectators and dead players. In the case of survival invasion, at the end of a wave, dead spectators should respawn with PST_REBORNNOINVENTORY, but dead players should respawn with PST_REBORN so that they don't replenish lives but still keep their inventory.

Edited by Adam Kaminski

Merge request reports

Loading