- virtual bool isLocal() const
- { return false; }
- virtual PlayerSAO *getPlayerSAO()
- { return NULL; }
- virtual void setPlayerSAO(PlayerSAO *sao)
- { assert(0); }
-
- /*
- 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()
- {
- if(m_last_hp != hp || m_last_pitch != m_pitch ||
- m_last_pos != m_position || m_last_yaw != m_yaw ||
- !(inventory == m_last_inventory))
- {
- m_last_hp = hp;
- m_last_pitch = m_pitch;
- m_last_pos = m_position;
- m_last_yaw = m_yaw;
- m_last_inventory = inventory;
- return true;
- } else {
- return false;
- }
- }
-
- 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;
-
- u8 light;