fixed selecting correct player in single player mode (after network gaming)
authorHolger Schemel <info@artsoft.org>
Sun, 17 Jun 2018 09:23:55 +0000 (11:23 +0200)
committerHolger Schemel <info@artsoft.org>
Mon, 18 Jun 2018 17:47:32 +0000 (19:47 +0200)
commit7466541c01db2ed673eee2302cd3ede5a5fbdf5e
tree877a3bccefc0aa573a40f515e127afd4683b0a20
parentfdbb975aee39b32064a9fdc461467e733c7854c9
fixed selecting correct player in single player mode (after network gaming)

When playing levels that contain more than one player in single player
mode, selecting the actual player when starting the level worked
correctly before only if the game was always played in single player
mode since it was started. It did not work correctly in the following
special case: There was a network multi-player game played before, but
the other (remote) client has disconnected (quit the game), leaving the
other client with a local player that might not be the first player.

In this case, using the first active player (which could be the first
player in the level) for the local player (which could be the second
player, because the network client was started after the now
disconnected client) would result in a broken player mapping, so the
player in the game cannot be moved.

This bugfix solves the problem by not using the first active player,
but the local player.
src/game.c