source-sdk-2013 icon indicating copy to clipboard operation
source-sdk-2013 copied to clipboard

[TF2] Make the respawn timer display "Respawning is not available" for extremely long respawn time

Open Lizard-Of-Oz opened this issue 9 months ago • 2 comments

On certain featured maps (Halloween Arena and VS Saxton Hale) and many community maps respawn is "disabled" by setting the respawn wave time to a very high number (e.g. 99999), but the game still displays it as "Respawning in N seconds...".

This PR makes the game display "Respawning is not available" in such a case, which will add a touch of "legitimacy". It also hides the respawn countdown from the team composition panel.

This PR requires the addition of a new locale "game_respawntime_disabled" "Respawning is not available"

Because this PR checks the time left until respawn, mappers shall set the respawn wave time way above 1000 seconds used in this code commit.

One might argue that having a bolted-on value check is "unclean" and a more purposeful solution should be introduced. E.g. an input-keyvalue-netprop combo for tf_gamerules like in my Custom Kill Icons PR. However, it adds extra moving parts that I think are unnecessary, as simply setting the respawn time to a bunch of nines is an intuitive approach even for a novice mapper. It's also a more flexible approach as the respawn timer can be manipulated by the mappers in several ways.

image

Lizard-Of-Oz avatar Mar 16 '25 20:03 Lizard-Of-Oz

IMO, using negative values to indicate no respawning would make more sense.

HyperionCoding avatar Mar 17 '25 13:03 HyperionCoding

IMO, using negative values to indicate no respawning would make more sense.

This wouldn't accommodate backwards compatibility for maps that use super high respawn times. Should check both <0 and >1000

ficool2 avatar Mar 17 '25 21:03 ficool2