From 054d9251bba40926613ada4330c2217bee042a02 Mon Sep 17 00:00:00 2001 From: Deve Date: Tue, 20 Oct 2015 19:52:30 +0200 Subject: [PATCH] Don't sort karts after loading saved GP. This causes issues in follow the leader races, because after sorting the leader is not leader anymore. This sorting function is most probably not needed because the list is sorted in startNextRace function (where the leader is properly skipped). --- src/config/saved_grand_prix.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/config/saved_grand_prix.cpp b/src/config/saved_grand_prix.cpp index 98f57a729..ffaf84dcc 100644 --- a/src/config/saved_grand_prix.cpp +++ b/src/config/saved_grand_prix.cpp @@ -181,5 +181,7 @@ void SavedGrandPrix::loadKarts(std::vector & kart_list) } // if m_local_player_id == -1 } // for i - std::sort(kart_list.begin(), kart_list.end(), cmp__l); + // The line below causes issues in follow the leader race. The leader + // is not at first place anymore. + // std::sort(kart_list.begin(), kart_list.end(), cmp__l); } // loadKarts