diff options
Diffstat (limited to 'src/player.h')
-rw-r--r-- | src/player.h | 62 |
1 files changed, 24 insertions, 38 deletions
diff --git a/src/player.h b/src/player.h index f38effa9d..fbd88fc71 100644 --- a/src/player.h +++ b/src/player.h @@ -233,16 +233,6 @@ public: return size; } - void setHotbarItemcount(s32 hotbar_itemcount) - { - hud_hotbar_itemcount = hotbar_itemcount; - } - - s32 getHotbarItemcount() - { - return hud_hotbar_itemcount; - } - void setHotbarImage(const std::string &name) { hud_hotbar_image = name; @@ -278,18 +268,6 @@ public: *params = m_sky_params; } - void overrideDayNightRatio(bool do_override, float ratio) - { - m_day_night_ratio_do_override = do_override; - m_day_night_ratio = ratio; - } - - void getDayNightRatio(bool *do_override, float *ratio) - { - *do_override = m_day_night_ratio_do_override; - *ratio = m_day_night_ratio; - } - void setLocalAnimations(v2s32 frames[4], float frame_speed) { for (int i = 0; i < 4; i++) @@ -309,11 +287,6 @@ public: return false; } - virtual PlayerSAO *getPlayerSAO() - { - return NULL; - } - virtual void setPlayerSAO(PlayerSAO *sao) { FATAL_ERROR("FIXME"); @@ -335,7 +308,7 @@ public: void setModified(const bool x) { m_dirty = x; - if (x == false) + if (!x) inventory.setModified(x); } @@ -391,10 +364,7 @@ public: std::string inventory_formspec; PlayerControl control; - PlayerControl getPlayerControl() - { - return control; - } + const PlayerControl& getPlayerControl() { return control; } u32 keyPressed; @@ -403,9 +373,6 @@ public: u32 addHud(HudElement* hud); HudElement* removeHud(u32 id); void clearHud(); - u32 maxHudId() { - return hud.size(); - } u32 hud_flags; s32 hud_hotbar_itemcount; @@ -429,9 +396,6 @@ protected: std::string m_sky_type; video::SColor m_sky_bgcolor; std::vector<std::string> m_sky_params; - - bool m_day_night_ratio_do_override; - float m_day_night_ratio; private: // Protect some critical areas // hud for example can be modified by EmergeThread @@ -463,6 +427,25 @@ public: const RemotePlayerChatResult canSendChatMessage(); + void setHotbarItemcount(s32 hotbar_itemcount) + { + hud_hotbar_itemcount = hotbar_itemcount; + } + + s32 getHotbarItemcount() const { return hud_hotbar_itemcount; } + + void overrideDayNightRatio(bool do_override, float ratio) + { + m_day_night_ratio_do_override = do_override; + m_day_night_ratio = ratio; + } + + void getDayNightRatio(bool *do_override, float *ratio) + { + *do_override = m_day_night_ratio_do_override; + *ratio = m_day_night_ratio; + } + private: PlayerSAO *m_sao; @@ -473,6 +456,9 @@ private: u32 m_last_chat_message_sent; float m_chat_message_allowance; u16 m_message_rate_overhead; + + bool m_day_night_ratio_do_override; + float m_day_night_ratio; }; #endif |