From f030154fe727e25a2afe1f78b3998c2d2dba95e4 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Tue, 18 Aug 2009 09:24:15 +0000 Subject: astyle cleanup, corrects not loading of material textures --- src/core/player.h | 90 +++++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 64 insertions(+), 26 deletions(-) (limited to 'src/core/player.h') diff --git a/src/core/player.h b/src/core/player.h index fc6740d..20a3b2d 100644 --- a/src/core/player.h +++ b/src/core/player.h @@ -32,68 +32,100 @@ public: /// default destructor virtual ~Player(); -/*----- inspectors ------------------------------------------------ */ + /*----- inspectors ------------------------------------------------ */ /// id of the player - inline const int id() const { return player_id; } - + inline const int id() const { + return player_id; + } + /// name of the player - inline const std::string & name() const { return player_name; } + inline const std::string & name() const { + return player_name; + } /// dirty flag - inline const bool dirty() const { return player_dirty; } + inline const bool dirty() const { + return player_dirty; + } /// the entity the Player is currently controling - inline EntityControlable *control() const { return player_control; } + inline EntityControlable *control() const { + return player_control; + } /// the zone the player is currently in - inline Zone *zone() const { return player_zone; } + inline Zone *zone() const { + return player_zone; + } /// set the zone the player is currently in void set_zone(Zone *zone); - inline const bool zonechange() const { return player_zonechange; } + inline const bool zonechange() const { + return player_zonechange; + } /// player primary color - inline const math::Color & color() const { return player_color; } + inline const math::Color & color() const { + return player_color; + } /// player secondary color - inline const math::Color & color_second() const { return player_color_second; } + inline const math::Color & color_second() const { + return player_color_second; + } /// player has been muted by admin or console - inline const bool mute() const { return player_mute; } + inline const bool mute() const { + return player_mute; + } - inline const std::string &rconpassword() const { return player_rconpassword; } + inline const std::string &rconpassword() const { + return player_rconpassword; + } /// mission target - inline Entity *mission_target() { return player_mission_target; } + inline Entity *mission_target() { + return player_mission_target; + } /// view - inline Entity *view() { return player_view; } + inline Entity *view() { + return player_view; + } /// credits - inline long credits() const { return player_credits; } + inline long credits() const { + return player_credits; + } /// network ping - inline long ping() const { return player_ping; } + inline long ping() const { + return player_ping; + } /// returns true of the player has enough credits to pay amount - inline bool has_credits(const long amount) const { return (player_credits >= amount); } + inline bool has_credits(const long amount) const { + return (player_credits >= amount); + } /// print player info to console virtual void print() const; /// player level - const int level() const { return player_level; } + const int level() const { + return player_level; + } -/*----- messages -------------------------------------------------- */ + /*----- messages -------------------------------------------------- */ /// send a text message void send(const std::string text); /** * @brief send a warning message - * Send the player a warning message abd set the warning + * Send the player a warning message abd set the warning * message timestamp to the current application time * @see last_warning() */ @@ -104,10 +136,12 @@ public: virtual void message(core::Message::Channel channel, const std::string text); /// time of the last warning message - float last_warning() const { return player_warningtime; } + float last_warning() const { + return player_warningtime; + } + - -/*----- mutators -------------------------------------------------- */ + /*----- mutators -------------------------------------------------- */ /// serialize player info to a stream void serialize_server_update(std::ostream & os) const; @@ -176,12 +210,16 @@ public: void set_level(const int level); /// set the dirty bit - inline void set_dirty(const bool dirty = true) { player_dirty = dirty; } + inline void set_dirty(const bool dirty = true) { + player_dirty = dirty; + } /// set the zonechange bit - inline void set_zonechange(const bool dirty = true) { player_zonechange = dirty; } + inline void set_zonechange(const bool dirty = true) { + player_zonechange = dirty; + } -/* -- should actually not be public --*/ + /* -- should actually not be public --*/ /// id of the player int player_id; -- cgit v1.2.3