Avoid side placement OOS by using std::stable_sort
Use of std::sort sometimes led to clients sorting placings with equal scores differently, leading to OOS when clients placed sides in different castles.
This commit is contained in:
parent
2cdcae6294
commit
cc9cf1a8a5
1 changed files with 1 additions and 1 deletions
|
@ -115,7 +115,7 @@ void game_state::place_sides_in_preferred_locations()
|
|||
++side_num;
|
||||
}
|
||||
|
||||
std::sort(placings.begin(),placings.end());
|
||||
std::stable_sort(placings.begin(),placings.end());
|
||||
std::set<int> placed;
|
||||
std::set<map_location> positions_taken;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue