Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#3305 closed defect (fixed)

[PATCH] Players can rejoin even if they were not present when the game started

Reported by: elexis Owned by: leper
Priority: Should Have Milestone: Alpha 19
Component: Core engine Keywords: patch
Cc: Patch:

Description

The gamesetup has a feature where players will be assignet the same the slot if they rejoin the gamesetup. The same feature is used for the session, so that clients will be assigned the same player after rejoining.

However there is a problem with that. If you join the match once, leave and then the game starts, you can still rejoin, although you were not present when the game started.

Reproduce: (1) Open a match (2) Join and disconnect with a second client (3) Start the game (with only the host) (4) The second client can rejoin as player 2, although he/she was not present when the game started.

A solution is to remove players that are not present when the game starts.

Originally posted in #3242.

Attachments (1)

t3305_clear_player_assignments_when_starting_the_game_v2.patch (733 bytes ) - added by elexis 9 years ago.
Same as attachment:t3242_clear_player_assignments_when_starting_the_game.patch:ticket:3242 but cleaned. The iterator is not invalidated since erase returns the next element of the map.

Download all attachments as: .zip

Change History (3)

by elexis, 9 years ago

Same as attachment:t3242_clear_player_assignments_when_starting_the_game.patch:ticket:3242 but cleaned. The iterator is not invalidated since erase returns the next element of the map.

comment:1 by leper, 9 years ago

Owner: set to leper
Resolution: fixed
Status: newclosed

In 16792:

Prevent players from rejoining that were not present on game start. Patch by elexis. Fixes #3305.

comment:2 by leper, 9 years ago

Keywords: review removed
Milestone: BacklogAlpha 19

Missing space after for, and I specified the full type, and made the loop be similar to all other iterator loops we have.

Note: See TracTickets for help on using tickets.