From e47a7b26a04de29074f0f05b3a9716e1c036446c Mon Sep 17 00:00:00 2001 From: Benau Date: Fri, 23 Nov 2018 22:17:21 +0800 Subject: [PATCH] Add variation for tie vote instead of always from "less" one --- src/network/protocols/server_lobby.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/network/protocols/server_lobby.cpp b/src/network/protocols/server_lobby.cpp index 977a2de95..dfabe1185 100644 --- a/src/network/protocols/server_lobby.cpp +++ b/src/network/protocols/server_lobby.cpp @@ -1986,7 +1986,8 @@ std::tuple ServerLobby::handleVote() auto track_vote = tracks.begin(); for (auto c_vote = tracks.begin(); c_vote != tracks.end(); c_vote++) { - if (c_vote->second > vote) + if (c_vote->second > vote || + (c_vote->second >= vote && rg.get(2) == 0)) { vote = c_vote->second; track_vote = c_vote; @@ -2002,7 +2003,8 @@ std::tuple ServerLobby::handleVote() auto lap_vote = laps.begin(); for (auto c_vote = laps.begin(); c_vote != laps.end(); c_vote++) { - if (c_vote->second > vote) + if (c_vote->second > vote || + (c_vote->second >= vote && rg.get(2) == 0)) { vote = c_vote->second; lap_vote = c_vote; @@ -2018,7 +2020,8 @@ std::tuple ServerLobby::handleVote() auto reverse_vote = reverses.begin(); for (auto c_vote = reverses.begin(); c_vote != reverses.end(); c_vote++) { - if (c_vote->second > vote) + if (c_vote->second > vote || + (c_vote->second >= vote && rg.get(2) == 0)) { vote = c_vote->second; reverse_vote = c_vote;