Skip to content

SI player can be assigned multiple tanks in a row in finale #851

Open

Description

@larrybrains

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).

Activity

  1. altair-sossai commented on Dec 5, 2024

    @altair-sossai
    Contributor

    The commit below will probably solve this problem, I will test it for a few days and get back to you.

    altair-sossai@aaccccc

  2. SirPlease commented on Dec 9, 2024

    @SirPlease
    Owner

    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?

  3. larrybrains commented on Dec 9, 2024

    @larrybrains
    Author

    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:

    1. 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.

    2. 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.

    3. 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.

  4. nikita1824 commented on Mar 3, 2025

    @nikita1824

    @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?

  5. altair-sossai commented on Mar 4, 2025

    @altair-sossai
    Contributor

    @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.

  6. nikita1824 commented on Mar 4, 2025

    @nikita1824

    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.

  7. altair-sossai commented on Aug 22, 2026

    @altair-sossai
    Contributor

    @nikita1824 @larrybrains

    #1004

    I believe that this pull request, if approved, could resolve the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions