MantisBT - Zandronum
View Issue Details
0004283Zandronum[All Projects] Bugpublic2024-05-14 07:062024-08-18 11:27
unknownna 
Kaminsky 
urgentmajoralways
resolvedfixed 
3.2 
3.23.2 
0004283: [3.2] Players can cheat and refill lost lives by dying during win sequences in survival invasion
If you deliberately die during a win sequence after a wave has ended and stay dead, you're automatically resurrected with full replenished lives that you lost during regular gameplay.
1. zandronum -file invasion_livesbug_01.wad +sv_maxlives 3 +map map01
2. Pick up the rocket launcher and wait for the countdown to finish.
3. When the monsters spawn, kill yourself first to lose 1 life.
4. Then kill the monsters, and then kill yourself again during the win sequence.
5. You will automatically respawn with all lives replenished.
After testing this between 3.1 and 3.2, it seems to be a 3.2 regression.
No tags attached.
related to 0004284resolved Kaminsky Player loses life in survival invasion if staying dead during countdown to wave 
related to 0004313resolved Kaminsky [3.2] Lives counter not updated properly in survival invasion intermission screen. 
? invasion_livesbug_01.wad (1,915) 2024-05-14 07:06
https://zandronum.com/tracker/file_download.php?file_id=3015&type=bug
Issue History
2024-05-14 07:06unknownnaNew Issue
2024-05-14 07:06unknownnaFile Added: invasion_livesbug_01.wad
2024-05-14 10:56unknownnaRelationship addedrelated to 0004284
2024-05-14 10:56unknownnaStatusnew => confirmed
2024-05-19 20:14Ru5tK1ngNote Added: 0023706
2024-06-08 08:37unknownnaRelationship addedrelated to 0004313
2024-07-26 15:03KaminskyNote Added: 0023821
2024-07-26 15:03KaminskyAssigned To => Kaminsky
2024-07-26 15:03KaminskyStatusconfirmed => needs review
2024-07-26 15:03KaminskyProduct Version3.1 => 3.2
2024-07-26 15:03KaminskyTarget Version => 3.2
2024-07-27 22:11unknownnaNote Added: 0023836
2024-07-27 22:11unknownnaStatusneeds review => feedback
2024-07-29 14:20KaminskyNote Added: 0023844
2024-07-29 14:20KaminskyNote Edited: 0023844bug_revision_view_page.php?bugnote_id=23844#r14318
2024-07-30 01:36unknownnaNote Added: 0023855
2024-07-30 01:36unknownnaStatusfeedback => assigned
2024-07-30 01:36unknownnaNote Edited: 0023855bug_revision_view_page.php?bugnote_id=23855#r14324
2024-07-30 01:36unknownnaNote Edited: 0023855bug_revision_view_page.php?bugnote_id=23855#r14325
2024-07-30 15:58KaminskyNote Added: 0023864
2024-07-31 14:36unknownnaNote Added: 0023869
2024-08-13 14:35KaminskyNote Added: 0023932
2024-08-13 14:35KaminskyStatusassigned => needs testing
2024-08-14 22:19unknownnaNote Added: 0023939
2024-08-14 22:19unknownnaStatusneeds testing => feedback
2024-08-15 03:53KaminskyNote Added: 0023945
2024-08-15 03:53KaminskyStatusfeedback => needs review
2024-08-18 11:27unknownnaNote Added: 0023962
2024-08-18 11:27unknownnaStatusneeds review => resolved
2024-08-18 11:27unknownnaFixed in Version => 3.2
2024-08-18 11:27unknownnaResolutionopen => fixed

Notes
(0023706)
Ru5tK1ng   
2024-05-19 20:14   
Regression was caused by this commit:'https://foss.heptapod.net/zandronum/zandronum-stable/-/commit/f440159546536a64860054e95a8f7bfb4d22d7d9 [^]'
(0023821)
Kaminsky   
2024-07-26 15:03   
This has been addressed in'https://foss.heptapod.net/zandronum/zandronum-stable/-/merge_requests/145 [^]'

Players who die during win sequences and wait until the next countdown to respawn can no longer replenish any lost lives, but they won't lose any either. This also fixes another issue where dead players lost their inventory if they respawned in this manner.
(0023836)
unknownna   
2024-07-27 22:11   
This works as intended, but I'm wondering one thing: Is it intentional that dead spectators are allowed to enter the game again every wave? I thought you had to survive with all your lives only once in survival invasion. Comparing to 2.0 after a quick test, you are not respawned with full lives in every wave in 2.0. If you lose all your lives, you're out until the map is finished or the other players lose.

With the recent change in behavior, survival invasion is a lot easier now than it used to be.
(0023844)
Kaminsky   
2024-07-29 14:20   
Quote from "unknownna"
Is it intentional that dead spectators are allowed to enter the game again every wave? I thought you had to survive with all your lives only once in survival invasion.


For a long, it's been possible for true spectators to join the game in-between waves during countdowns. Admittedly, when I committed'https://foss.heptapod.net/zandronum/zandronum-stable/-/commit/f440159546536a64860054e95a8f7bfb4d22d7d9 [^]' I thought this behaviour was intended, judging from the code, and that dead spectators not being revived or the join queue being emptied was a bug. Now that I'm looking deeper into the repository's history, I see that this wasn't always the case. Originally, spectators were unable to join the game after the first wave's countdown, but this regressed at some point (i.e.'https://foss.heptapod.net/zandronum/zandronum-stable/-/commit/64e27f21da8c76442f7fb2b2fe7bf1de644ab175 [^]').

Even though this is a regression, I do think 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. It reminds me of other invasion-styled games like Zombies in Call of Duty where dead players are revived at the end of a wave. Though, I wouldn't mind adding something like a compatflag to restore the old behaviour of not allowing anyone to re-join after the first wave has started.

Now that I think about it, if we want to keep the current behaviour, then I think it's fair to replenish the lives of everyone that was already alive too.

(0023855)
unknownna   
2024-07-30 01:36   
Quote from Kaminsky
For a long, it's been possible for true spectators to join the game in-between waves during countdowns.


I had no idea this was even possible, and had I known, I would've reported it as a bug ASAP. Seems like the first version this new behavior appears in is 3.1. It doesn't happen in 2.1.2 and 3.0.

Quote from Kaminsky
Now that I think about it, if we want to keep the current behaviour, then I think it's fair to replenish the lives of everyone that was already alive too.


It would be consistent with the new behavior, but now we're talking about changing up the mode a lot though. It feels more like a mutator/DMFlag than a compatflag to me, e.g. "let players join every wave". The new behavior is made on top of some regression with the join code, which in turn changed up the mode considerably.

(0023864)
Kaminsky   
2024-07-30 15:58   
Quote from "unknownna"
I had no idea this was even possible, and had I known, I would've reported it as a bug ASAP. Seems like the first version this new behavior appears in is 3.1. It doesn't happen in 2.1.2 and 3.0.


Ah, I was wrong then (admittedly, I didn't check 3.0 or earlier when I posted my other comment). Sorry about that. This regression started much sooner and likely as a result of:'https://foss.heptapod.net/zandronum/zandronum-stable/-/commit/689fe48904f39000b32d02f20e7eb88ef8c6595d [^]' then. If that's the case, then this whole approach seems wrong. It's still a question if the current "regressed" behaviour is worth keeping as an option, or if I should revert some of the changes along with fixing the regression.
(0023869)
unknownna   
2024-07-31 14:36   
Quote from Kaminsky
It's still a question if the current "regressed" behaviour is worth keeping as an option, or if I should revert some of the changes along with fixing the regression.

I think the changes should perhaps be reverted, with the new behavior added as a DMFlag or something. Since the other FPS games allow you to join after every wave, it would be nice to support it in Zandronum as well. Like you said, some waves and map packs can take quite long indeed and it's not fun to wait.

You end up with 2 styles of survival invasion:

* Regular survival invasion where you have to survive from start to finish. This works well with sv_maxlives 2+.
* Alternate modern survival invasion where you can join the game every wave. It would probably be most fun when sv_maxlives is only 1.

If you support the new behavior, you should probably replenish surviving players' lives every wave too, as said earlier.
(0023932)
Kaminsky   
2024-08-13 14:35   
These commits got pushed in the other day:'https://foss.heptapod.net/zandronum/zandronum-stable/-/commit/9cfcb67c89b637f3e3e72e60ef02248fe7bf22d7 [^]' and'https://foss.heptapod.net/zandronum/zandronum-stable/-/commit/36635048f0daf77c98c9161af97d24c922f123fa [^]'

I partially restored the old behaviour of not allowing (dead) spectators to respawn at the end of a wave prior to 3.1. The new "regressed" behaviour can be re-enabled with the new CVar, "sv_respawninsurvivalinvasion". All players' lives will be fully replenished at the start of the next wave when this CVar's enabled too.

I also fixed players potentially "cheating" by dying in the middle of a wave, then waiting to respawn until the wave's complete to avoid losing a life.
(0023939)
unknownna   
2024-08-14 22:19   
Ok, initial testing seems to indicate that it's working well. Dead spectators and players in the join queue can't join the game at every wave start anymore unless sv_respawninsurvivalinvasion is 1.
And lives are replenished every wave when it's set to 1 as expected.

But the sv_respawninsurvivalinvasion variable doesn't have a server notification message when it's changed.

Quote from Kaminsky
I also fixed players potentially "cheating" by dying in the middle of a wave, then waiting to respawn until the wave's complete to avoid losing a life.

Good catch.
(0023945)
Kaminsky   
2024-08-15 03:53   
Quote from "unknownna"
But the sv_respawninsurvivalinvasion variable doesn't have a server notification message when it's changed.


This merge request should take care of the missing server notification message (which only appears in online survival invasion games):'https://foss.heptapod.net/zandronum/zandronum-stable/-/merge_requests/168 [^]'

Thanks for testing everything else thoroughly, as always.
(0023962)
unknownna   
2024-08-18 11:27   
Tested the latest fix and it works. Great job!