summaryrefslogtreecommitdiffstats
path: root/source/cPlayer.h
diff options
context:
space:
mode:
authorlapayo94@gmail.com <lapayo94@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-01-01 05:55:17 +0100
committerlapayo94@gmail.com <lapayo94@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-01-01 05:55:17 +0100
commitd7068b35a85f0c0248a5533240087747d02e1a17 (patch)
tree7d40a34bdda09c0fbccc9e8052043709cfd88d7b /source/cPlayer.h
parentChests, furnaces and dispensers face the correct way now. (diff)
downloadcuberite-d7068b35a85f0c0248a5533240087747d02e1a17.tar
cuberite-d7068b35a85f0c0248a5533240087747d02e1a17.tar.gz
cuberite-d7068b35a85f0c0248a5533240087747d02e1a17.tar.bz2
cuberite-d7068b35a85f0c0248a5533240087747d02e1a17.tar.lz
cuberite-d7068b35a85f0c0248a5533240087747d02e1a17.tar.xz
cuberite-d7068b35a85f0c0248a5533240087747d02e1a17.tar.zst
cuberite-d7068b35a85f0c0248a5533240087747d02e1a17.zip
Diffstat (limited to '')
-rw-r--r--source/cPlayer.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/source/cPlayer.h b/source/cPlayer.h
index 4d348c2ad..d2d1e91d7 100644
--- a/source/cPlayer.h
+++ b/source/cPlayer.h
@@ -1,6 +1,8 @@
#pragma once
#include "cPawn.h"
+#include "cSurvivalInventory.h"
+#include "cCreativeInventory.h"
#include <list>
#include <string> // TODO - use const char*
@@ -8,6 +10,8 @@ class cGroup;
class cWindow;
class cInventory;
class cClientHandle;
+
+
class cPlayer : public cPawn //tolua_export
{ //tolua_export
public:
@@ -27,7 +31,8 @@ public:
Vector3d GetEyePosition(); //tolua_export
inline bool GetFlying() { return m_bTouchGround; } //tolua_export
inline const double & GetStance() { return m_Stance; } //tolua_export
- cInventory & GetInventory() { return *m_Inventory; } //tolua_export
+ cInventory & GetInventory() { if(GetGameMode() == 0) return *m_Inventory; else return *m_CreativeInventory; } //tolua_export
+ cSurvivalInventory & GetSurvivalInventory() { return *m_Inventory; } //tolua_export
virtual void TeleportTo( const double & a_PosX, const double & a_PosY, const double & a_PosZ ); //tolua_export
@@ -95,7 +100,8 @@ protected:
float m_LastGroundHeight;
bool m_bTouchGround;
double m_Stance;
- cInventory* m_Inventory;
+ cSurvivalInventory* m_Inventory;
+ cCreativeInventory* m_CreativeInventory;
cWindow* m_CurrentWindow;
float m_TimeLastPickupCheck;