You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
SI player can be assigned multiple tanks in a row in finale #851
Sometimes in the finale, one player can get tank twice in a row.
I believe this occurs when:
a) there are less than 5 maps in a campaign
b) the survivors wipe before spawning tanks on early maps.
c) all of the above
I think this is because if the initial tank player queue isn't exhausted before the finale map, the 4th player will get the first finale tank, and then the queue will be reset and that player will be put back into the queue and have the chance to play tank again in that same finale map, creating the potential for a situation where the same player plays tank in finale twice in a row.
Maybe after the first tank in the finale (or any map with more than 1 tank), exclude that player from being selected again during that round until the other 3 players have had their chance to play tank. If all other players have already played tank once during the round, then allow the queue to reset. (this would also account for weird custom maps/servers/mods when a map has 4+ tanks in a round).
I'm confused, considering what you're describing is part of the plugin's logic.
When the tank array resets, everybody should have an equal chance at becoming the tank, which is what is happening.
Are there any game issues that occur or unfairness with a player playing tank twice in a row?
I see what you are saying and while the tank selection process is inherently fair in terms of giving everyone an equal chance at playing as tank, I believe issues arise when other factors are considered:
If an exceptional tank player gets selected twice in a row during the finale, it may feel unfair to the other team. On the other hand, if an unskilled player gets tank twice, it can be demoralizing for the SI team. This is especially unfair in close games, where the losing team might suffer disproportionately from an unskilled tank player being selected twice in a row, while the leading team benefits from a skilled duplicate tank player.
Many players are unaware of why duplicate tanks occur in the finale. This often leads to complaints, with players perceiving it as a bug or imbalance rather than an intended part of the tank selection logic.
Some players find playing as tank stressful, especially when selected twice in a row with only a brief break between tanks, with what could be a game-winning or game-losing tank, so it can reduce their enjoyment of the game. We all know the feeling of a dreadful silence after a bad tank....
So by preventing duplicate consecutive tank selection in the finale, perceived imbalance and player frustration can be minimized while still ensuring that everyone has their fair share of time as tank. This also adds variety to the tank fights, making the finale more dynamic and enjoyable for everyone.
@altair-sossai
Hi, correct me if I'm wrong but, when you call h_whosHadTank.Erase(index), it removes an element from the array, which can cause the indices of subsequent elements to shift. If you continue to increment i in the loop after erasing an element, you may skip checking the next element that has shifted into the current index.
Moreover, as I can tell, you pass h_whosHadTank to RequeueInfecteds() but do we need to use both arrayList and h_whosHadTank in this function?
@nikita1824 Yes, you are correct; there's a bug, thanks for letting me know.
However, thinking it over, I agree with Sir. I believe that even if a player ends up receiving the Tank twice in a row, it's still the fairest approach, as everyone should have the same chance of getting the Tank.
On my servers, I kept it unchanged and am using the existing logic as it is.
There is another problem: if a player, for example in a 2v2, crashes/leaves and then returns, and another player has already played as a tank, the tank pool will be cleared, allowing the same player to play as a tank for two next maps in a row. Ideally, every player should play as a tank twice in a single campaign (5-map campaigns, excluding the final maps if the survivors make it), but in the current state of the plugin, this issue can occur.
Activity
Implement requeueing of infected players when no tanks are available
altair-sossai commentedon Dec 5, 2024
The commit below will probably solve this problem, I will test it for a few days and get back to you.
altair-sossai@aaccccc
SirPlease commentedon Dec 9, 2024
I'm confused, considering what you're describing is part of the plugin's logic.
When the tank array resets, everybody should have an equal chance at becoming the tank, which is what is happening.
Are there any game issues that occur or unfairness with a player playing tank twice in a row?
larrybrains commentedon Dec 9, 2024
I see what you are saying and while the tank selection process is inherently fair in terms of giving everyone an equal chance at playing as tank, I believe issues arise when other factors are considered:
If an exceptional tank player gets selected twice in a row during the finale, it may feel unfair to the other team. On the other hand, if an unskilled player gets tank twice, it can be demoralizing for the SI team. This is especially unfair in close games, where the losing team might suffer disproportionately from an unskilled tank player being selected twice in a row, while the leading team benefits from a skilled duplicate tank player.
Many players are unaware of why duplicate tanks occur in the finale. This often leads to complaints, with players perceiving it as a bug or imbalance rather than an intended part of the tank selection logic.
Some players find playing as tank stressful, especially when selected twice in a row with only a brief break between tanks, with what could be a game-winning or game-losing tank, so it can reduce their enjoyment of the game. We all know the feeling of a dreadful silence after a bad tank....
So by preventing duplicate consecutive tank selection in the finale, perceived imbalance and player frustration can be minimized while still ensuring that everyone has their fair share of time as tank. This also adds variety to the tank fights, making the finale more dynamic and enjoyable for everyone.
nikita1824 commentedon Mar 3, 2025
@altair-sossai
Hi, correct me if I'm wrong but, when you call
h_whosHadTank.Erase(index), it removes an element from the array, which can cause the indices of subsequent elements to shift. If you continue to incrementiin the loop after erasing an element, you may skip checking the next element that has shifted into the current index.Moreover, as I can tell, you pass
h_whosHadTanktoRequeueInfecteds()but do we need to use botharrayListandh_whosHadTankin this function?altair-sossai commentedon Mar 4, 2025
@nikita1824 Yes, you are correct; there's a bug, thanks for letting me know.
However, thinking it over, I agree with Sir. I believe that even if a player ends up receiving the Tank twice in a row, it's still the fairest approach, as everyone should have the same chance of getting the Tank.
On my servers, I kept it unchanged and am using the existing logic as it is.
nikita1824 commentedon Mar 4, 2025
There is another problem: if a player, for example in a 2v2, crashes/leaves and then returns, and another player has already played as a tank, the tank pool will be cleared, allowing the same player to play as a tank for two next maps in a row. Ideally, every player should play as a tank twice in a single campaign (5-map campaigns, excluding the final maps if the survivors make it), but in the current state of the plugin, this issue can occur.
altair-sossai commentedon Aug 22, 2026
@nikita1824 @larrybrains
#1004
I believe that this pull request, if approved, could resolve the issue.