45 std::vector<std::string> m_tracks;
49 int m_extra_server_info;
51 int m_hit_capture_limit;
53 float m_battle_time_limit;
57 std::atomic_bool m_is_grand_prix;
59 irr::core::stringw m_message_of_today;
74 if (!isGrandPrixStarted())
78 m_hit_capture_limit = 0;
79 m_battle_time_limit = 0.0f;
82 void resetExtraServerInfo()
84 m_is_grand_prix.store(
false);
85 m_extra_server_info = -1;
88 void setGrandPrixTrack(
int tracks_no)
90 m_is_grand_prix.store(
true);
91 m_extra_server_info = tracks_no;
98 bool isGrandPrix()
const {
return m_is_grand_prix.load(); }
100 bool hasExtraSeverInfo()
const {
return m_extra_server_info != -1; }
102 uint8_t getExtraServerInfo()
const
104 assert(hasExtraSeverInfo());
105 return (uint8_t)m_extra_server_info;
108 unsigned getTotalGrandPrixTracks()
const
110 assert(isGrandPrix());
111 return m_extra_server_info;
114 void setSoccerGoalTarget(
bool val) { m_extra_server_info = (int)val; }
116 bool isSoccerGoalTarget()
const
118 assert(hasExtraSeverInfo());
119 return m_extra_server_info != 0;
122 bool isGrandPrixStarted()
const
124 return isGrandPrix() && !m_tracks.empty() &&
125 m_tracks.size() != getTotalGrandPrixTracks();
128 void stopGrandPrix() { m_tracks.clear(); }
130 const std::vector<std::string>& getAllTracks()
const {
return m_tracks; }
132 const std::string& getCurrentTrack()
const {
return m_tracks.back(); }
134 void sortPlayersForGrandPrix(
135 std::vector<std::shared_ptr<NetworkPlayerProfile> >& players)
const;
137 void sortPlayersForGame(
138 std::vector<std::shared_ptr<NetworkPlayerProfile> >& players)
const;
140 void setHitCaptureTime(
int hc,
float time)
142 m_hit_capture_limit = hc;
143 m_battle_time_limit = time;
Used to store the needed data about the players that join a game. This class stores all the possible ...
Definition: game_setup.hpp:43
std::string m_server_name_utf8
Utf8 server name (with xml decoded)
Definition: game_setup.hpp:62
Contains the profile of a player.
Definition: network_player_profile.hpp:42
A new implementation of NetworkString, which has a fixed format: Byte 0: The type of the message,...
Definition: network_string.hpp:422
A simple structure to store a vote from a client: track name, number of laps and reverse or not.
Definition: peer_vote.hpp:30