Tune caves
[oweals/minetest.git] / src / player.h
index 107c829f8c52405c4b9845e4779d2885b3844801..d0e1ac79923b7d521fe362e4d65513dc75e97d49 100644 (file)
@@ -22,7 +22,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 
 #include "common_irrlicht.h"
 #include "inventory.h"
-#include "collision.h"
 
 #define PLAYERNAME_SIZE 20
 
@@ -31,6 +30,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 
 class Map;
 class IGameDef;
+struct CollisionInfo;
 
 class Player
 {
@@ -102,21 +102,22 @@ public:
                return m_yaw;
        }
 
-       virtual void updateName(const char *name)
+       f32 getRadPitch()
        {
-               snprintf(m_name, PLAYERNAME_SIZE, "%s", name);
+               return -1.0 * m_pitch * core::DEGTORAD;
        }
 
-       virtual void wieldItem(u16 item);
-       virtual const InventoryItem *getWieldItem() const
+       f32 getRadYaw()
        {
-               const InventoryList *list = inventory.getList("main");
-               if (list)
-                       return list->getItem(m_selected_item);
-               return NULL;
+               return (m_yaw + 90.) * core::DEGTORAD;
        }
 
-       const char * getName()
+       virtual void updateName(const char *name)
+       {
+               snprintf(m_name, PLAYERNAME_SIZE, "%s", name);
+       }
+
+       const char * getName() const
        {
                return m_name;
        }
@@ -154,8 +155,6 @@ public:
        // Actual inventory is backed up here when creative mode is used
        Inventory *inventory_backup;
 
-       bool craftresult_is_preview;
-
        u16 hp;
 
        u16 peer_id;
@@ -164,7 +163,6 @@ protected:
        IGameDef *m_gamedef;
 
        char m_name[PLAYERNAME_SIZE];
-       u16 m_selected_item;
        f32 m_pitch;
        f32 m_yaw;
        v3f m_speed;
@@ -238,6 +236,8 @@ public:
        void move(f32 dtime, Map &map, f32 pos_max_d);
 
        void applyControl(float dtime);
+
+       v3s16 getStandingNodePos();
        
        PlayerControl control;