diff --git a/src/race/grand_prix_data.cpp b/src/race/grand_prix_data.cpp index d4354634d..2447bbf46 100644 --- a/src/race/grand_prix_data.cpp +++ b/src/race/grand_prix_data.cpp @@ -476,9 +476,9 @@ std::vector GrandPrixData::getLaps(bool include_locked) const * \param include_locked If data for locked tracks should be included or not. * \return A copy of alist with the reverse status for each track. */ -std::vector GrandPrixData::getReverse(bool include_locked) const +std::vector GrandPrixData::getReverse(bool include_locked) const { - std::vector reverse; + std::vector reverse; for (unsigned int i = 0; i< m_tracks.size(); i++) if(isTrackAvailable(m_tracks[i], include_locked)) reverse.push_back(m_reversed[i]); diff --git a/src/race/grand_prix_data.hpp b/src/race/grand_prix_data.hpp index 7f71b54b0..cd44e60c4 100644 --- a/src/race/grand_prix_data.hpp +++ b/src/race/grand_prix_data.hpp @@ -23,6 +23,7 @@ #include #include #include +#include "utils/types.hpp" using irr::core::stringw; @@ -65,7 +66,8 @@ private: std::vector m_laps; /** Whether the track in question should be done in reverse mode */ - std::vector m_reversed; + // This is uint8_t instead of bool because of GitHub issue #5053 + std::vector m_reversed; /** Wether the user can edit this grand prix or not */ bool m_editable; @@ -137,7 +139,7 @@ public: bool checkConsistency(bool log_error=true) const; std::vector getLaps(const bool includeLocked=false) const; - std::vector getReverse(const bool includeLocked=false) const; + std::vector getReverse(const bool includeLocked=false) const; bool isEditable() const; const std::string& getTrackId(const unsigned int track) const; irr::core::stringw getTrackName(const unsigned int track) const; diff --git a/src/race/race_manager.hpp b/src/race/race_manager.hpp index 3f5d28a65..69356f510 100644 --- a/src/race/race_manager.hpp +++ b/src/race/race_manager.hpp @@ -34,6 +34,7 @@ #include "network/remote_kart_info.hpp" #include "race/grand_prix_data.hpp" #include "utils/vec3.hpp" +#include "utils/types.hpp" class AbstractKart; class NetworkString; @@ -316,7 +317,8 @@ private: std::vector m_num_laps; /** Whether a track should be reversed */ - std::vector m_reverse_track; + // This is uint8_t instead of bool because of GitHub issue #5053 + std::vector m_reverse_track; /** The list of default AI karts to use. This is from the command line. */ std::vector m_default_ai_list; diff --git a/src/states_screens/grand_prix_cutscene.cpp b/src/states_screens/grand_prix_cutscene.cpp index f199ae0c9..8610bbcd0 100644 --- a/src/states_screens/grand_prix_cutscene.cpp +++ b/src/states_screens/grand_prix_cutscene.cpp @@ -53,7 +53,7 @@ void GrandPrixCutscene::setNewGPWithName(const irr::core::stringw& name) const GrandPrixData current_gp = RaceManager::get()->getGrandPrix(); std::vector tracks = current_gp.getTrackNames(); std::vector laps = current_gp.getLaps(); - std::vector reverse = current_gp.getReverse(); + std::vector reverse = current_gp.getReverse(); for (unsigned int i = 0; i < laps.size(); i++) gp->addTrack(track_manager->getTrack(tracks[i]), laps[i], reverse[i]); gp->writeToFile();