- 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;
- }
-
- std::string getHotbarImage()
- {
- return hud_hotbar_image;
- }
-
- void setHotbarSelectedImage(const std::string &name)
- {
- hud_hotbar_selected_image = name;
- }
-
- std::string getHotbarSelectedImage() {
- return hud_hotbar_selected_image;
- }
-
- void setSky(const video::SColor &bgcolor, const std::string &type,
- const std::vector<std::string> ¶ms)
- {
- m_sky_bgcolor = bgcolor;
- m_sky_type = type;
- m_sky_params = params;
- }
-
- void getSky(video::SColor *bgcolor, std::string *type,
- std::vector<std::string> *params)
- {
- *bgcolor = m_sky_bgcolor;
- *type = m_sky_type;
- *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++)
- local_animations[i] = frames[i];
- local_animation_speed = frame_speed;
- }
-
- void getLocalAnimations(v2s32 *frames, float *frame_speed)
- {
- for (int i = 0; i < 4; i++)
- frames[i] = local_animations[i];
- *frame_speed = local_animation_speed;
- }
-
- virtual bool isLocal() const
- {
- return false;
- }
-
- virtual PlayerSAO *getPlayerSAO()
- {
- return NULL;
- }
-
- virtual void setPlayerSAO(PlayerSAO *sao)
- {
- FATAL_ERROR("FIXME");
- }
-
- /*
- serialize() writes a bunch of text that can contain
- any characters except a '\0', and such an ending that
- deSerialize stops reading exactly at the right point.
- */
- void serialize(std::ostream &os);
- void deSerialize(std::istream &is, std::string playername);
-
- bool checkModified() const
- {
- return m_dirty || inventory.checkModified();
- }
-
- void setModified(const bool x)
- {
- m_dirty = x;
- if (x == false)
- inventory.setModified(x);
- }
-
- // Use a function, if isDead can be defined by other conditions
- bool isDead() { return hp == 0; }
-
- bool got_teleported;
- bool touching_ground;
- // This oscillates so that the player jumps a bit above the surface
- bool in_liquid;
- // This is more stable and defines the maximum speed of the player
- bool in_liquid_stable;
- // Gets the viscosity of water to calculate friction
- u8 liquid_viscosity;
- bool is_climbing;
- bool swimming_vertical;
- bool camera_barely_in_ceiling;