|
SuperTuxKart
|
Contains the profile of a player. More...
#include <network_player_profile.hpp>
Public Member Functions | |
| NetworkPlayerProfile (KartTeam team) | |
| NetworkPlayerProfile (std::shared_ptr< STKPeer > peer, const irr::core::stringw &name, uint32_t host_id, float default_kart_color, uint32_t online_id, HandicapLevel handicap, uint8_t local_player_id, KartTeam team, const std::string &country_code) | |
| bool | isLocalPlayer () const |
| Returns true if this player is local, i.e. More... | |
| uint32_t | getHostId () const |
| Returns the host id of this player. | |
| void | setKartName (const std::string &kart_name) |
| Sets the kart name for this player. | |
| const std::string & | getKartName () const |
| Returns the name of the kart this player has selected. | |
| uint8_t | getLocalPlayerId () const |
| Retuens the local player id for this player. | |
| HandicapLevel | getHandicap () const |
| Returns the player's handicap. | |
| void | setHandicap (HandicapLevel h) |
| const irr::core::stringw & | getName () const |
| Returns the name of this player. | |
| float | getDefaultKartColor () const |
| uint32_t | getOnlineId () const |
| bool | isOfflineAccount () const |
| std::shared_ptr< STKPeer > | getPeer () const |
| int | getScore () const |
| float | getOverallTime () const |
| void | setScore (int score) |
| void | setOverallTime (float time) |
| void | resetGrandPrixData () |
| void | setTeam (KartTeam team) |
| KartTeam | getTeam () const |
| const std::string & | getCountryCode () const |
| void | setKartData (const KartData &data) |
| const KartData & | getKartData () const |
Static Public Member Functions | |
| static std::shared_ptr< NetworkPlayerProfile > | getReservedProfile (KartTeam team) |
Private Attributes | |
| std::weak_ptr< STKPeer > | m_peer |
| irr::core::stringw | m_player_name |
| The name of the player. | |
| uint32_t | m_host_id |
| Host id of this player. | |
| float | m_default_kart_color |
| uint32_t | m_online_id |
| std::atomic< HandicapLevel > | m_handicap |
| Handicap level of this player. | |
| std::string | m_kart_name |
| The selected kart id. | |
| uint8_t | m_local_player_id |
| The local player id relative to each peer. | |
| int | m_score |
| Score if grand prix. | |
| float | m_overall_time |
| Overall time if grand prix. | |
| std::atomic< KartTeam > | m_team |
| std::string | m_country_code |
| 2-letter country code of player. | |
| KartData | m_kart_data |
Contains the profile of a player.
| bool NetworkPlayerProfile::isLocalPlayer | ( | ) | const |
Returns true if this player is local, i.e.
running on this computer. This is done by comparing the host id of this player with the host id of this computer.