From 6342e04fea5dbe1b25608582457c8c48eabba951 Mon Sep 17 00:00:00 2001 From: Benau Date: Thu, 20 Dec 2018 12:45:27 +0800 Subject: [PATCH] Remove or adjust more invalid vote settings --- src/network/protocols/server_lobby.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/network/protocols/server_lobby.cpp b/src/network/protocols/server_lobby.cpp index edd553ac7..413a3a9a5 100644 --- a/src/network/protocols/server_lobby.cpp +++ b/src/network/protocols/server_lobby.cpp @@ -1964,6 +1964,7 @@ void ServerLobby::handlePlayerVote(Event* event) assert(t); } + // Remove / adjust any invalid settings if (race_manager->modeHasLaps()) { if (ServerConfig::m_auto_game_time_ratio > 0.0f) @@ -1998,6 +1999,17 @@ void ServerLobby::handlePlayerVote(Event* event) vote.m_num_laps = (uint8_t)7; } } + else if (race_manager->getMinorMode() == + RaceManager::MINOR_MODE_FREE_FOR_ALL) + { + vote.m_num_laps = 0; + } + else if (race_manager->getMinorMode() == + RaceManager::MINOR_MODE_CAPTURE_THE_FLAG) + { + vote.m_num_laps = 0; + vote.m_reverse = false; + } // Store vote: vote.m_player_name = event->getPeer()->getPlayerProfiles()[0]->getName();