From d7068b35a85f0c0248a5533240087747d02e1a17 Mon Sep 17 00:00:00 2001 From: "lapayo94@gmail.com" Date: Sun, 1 Jan 2012 04:55:17 +0000 Subject: - implemented separated inventory for creative mode (cSurvivalInventory and cCreativeInventory) (Separation is not perfect yet, because maybe there are some mayor changes needed :D) - implemented CreativeInventoryAction (was mistakenly called CreateInventoryAction) -> Fixed meta data for creative selected blocks ->->Slabs/Steps are now placed correctly - slabs can now be build to a double slab - fixed a bug in the inventory which put items with different meta values in the same slot git-svn-id: http://mc-server.googlecode.com/svn/trunk@160 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/cPlayer.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'source/cPlayer.h') 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 #include // 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; -- cgit v1.2.3