• Please make sure you are familiar with the forum rules. You can find them here: https://forums.tripwireinteractive.com/index.php?threads/forum-rules.2334636/

PC [1061] Trader time skip doesn't work following a failed partial vote etc

In the RecieveSkipTraderTimeVote function of KFVoteCollector.uc:

if (PlayersThatHaveVoted.Find(PRI) == INDEX_NONE)
{

The PlayersThatHaveVoted array is for kickvotes, it should instead be checking PlayersReadyToSkipTrader here.


Currently, this might allow the same player to be added twice if they were added previously and the vote wasn't successful.

As such, the end of the ShouldSkipTrader function will find more players ready to skip than exist currently and the vote never succeeds:
return PlayersReadyToSkipTrader.length == PRIs.length;

Looking at this, the skip vote might also fail permanently if a player votes and then leaves as they're in the PlayersReadyToSkipTrader array but no longer counted towards the PRI amount.
 
  • Like
Reactions: Arkadeivitch
1062 made a workaround, but it still checks the kickvote list which lets it add individual players multiple times if they vote every wave.
Votes should no longer fail, but they might still succeed unintentionally based on failed votes in previous waves.

2 players
First trader: Player A votes to skip, player B does not vote. Vote does not pass.
Second trader: Player A does not vote, player B votes to skip. Trader skips, despite player A not voting this wave.
 
Upvote 0