Branch: refs/heads/master
Home: https://github.com/Warzone2100/warzone2100
Commit: e07eb7f5a700561c1b855001aaabf2b965954f8d
https://github.com/Warzone2100/warzone2100/commit/e07eb7f5a700561c1b855001aaabf2b965954f8d
Author: Thiago Barcala <[email protected]>
Date: 2021-03-26 (Fri, 26 Mar 2021)
Changed paths:
M src/multiint.cpp
Log Message:
-----------
Fix player duplication in skirmish
https://github.com/Warzone2100/warzone2100/pull/994 introduced the
function `resetPlayerConfiguration`, but this function avoids changing
the local player's information.
This causes problems when `NetPlay.players[selectedPlayer].position !=
selectedPlayer`, cause in this case, the position of all other players
is reset to match their index, causing the position of the player with
index `NetPlay.players[selectedPlayer].position` to be the same as the
position of `selectedPlayer`.
The flag `bShouldResetLocal`, introduced in the commit
37f4eb11d352e30b57665a94cf4a7dbba4619e38 tried to fix this and some
related issues, but only in some situations. When `bShouldResetLocal` is
false the problem still happens.
The approached used in this commit causes all players' positions to be
reset, and at the end, if the local player position is supposed to be
kept, the position gets swapped with one of the other players.
_______________________________________________
Warzone2100-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/warzone2100-commits