[TF2] Make the respawn timer display "Respawning is not available" for extremely long respawn time #1121
+6
−2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.