- f32 getPitch()
- {
- return m_pitch;
- }
-
- f32 getYaw()
- {
- return m_yaw;
- }
-
- f32 getRadPitch()
- {
- return -1.0 * m_pitch * core::DEGTORAD;
- }
-
- f32 getRadYaw()
- {
- return (m_yaw + 90.) * core::DEGTORAD;
- }
-
- void updateName(const char *name)
- {
- snprintf(m_name, PLAYERNAME_SIZE, "%s", name);
- }
-
- const char * getName() const
- {
- return m_name;
- }
-
- core::aabbox3d<f32> getCollisionbox() {
- return m_collisionbox;
- }
-
- 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);
-
- 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;