diff options
author | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2014-06-01 19:46:59 +0200 |
---|---|---|
committer | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2014-06-01 19:46:59 +0200 |
commit | 576f89c1d5bdb067c0ca06237440f754d80bd13c (patch) | |
tree | cae685487d49fd420d68c850e87cbdec467e5fca /src/Entities/Player.h | |
parent | Implemented end and nether portals (diff) | |
download | cuberite-576f89c1d5bdb067c0ca06237440f754d80bd13c.tar cuberite-576f89c1d5bdb067c0ca06237440f754d80bd13c.tar.gz cuberite-576f89c1d5bdb067c0ca06237440f754d80bd13c.tar.bz2 cuberite-576f89c1d5bdb067c0ca06237440f754d80bd13c.tar.lz cuberite-576f89c1d5bdb067c0ca06237440f754d80bd13c.tar.xz cuberite-576f89c1d5bdb067c0ca06237440f754d80bd13c.tar.zst cuberite-576f89c1d5bdb067c0ca06237440f754d80bd13c.zip |
Diffstat (limited to 'src/Entities/Player.h')
-rw-r--r-- | src/Entities/Player.h | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/Entities/Player.h b/src/Entities/Player.h index 582f79b86..5c0b61064 100644 --- a/src/Entities/Player.h +++ b/src/Entities/Player.h @@ -331,7 +331,7 @@ public: virtual bool MoveToWorld(const AString & a_WorldName, cWorld * a_World = NULL) override; // tolua_export bool SaveToDisk(void); - bool LoadFromDisk(void); + bool LoadFromDisk(cWorld * a_World); void LoadPermissionsFromDisk(void); // tolua_export const AString & GetLoadedWorldName() { return m_LoadedWorldName; } @@ -391,11 +391,19 @@ public: /** If true the player can fly even when he's not in creative. */ void SetCanFly(bool a_CanFly); + /** Gets the last position that the player slept in */ + Vector3i GetLastBedPos(void) const { return m_LastBedPos; } + + /** Sets the player's bed (home) position */ + void SetBedPos(const Vector3i & a_Pos) { m_LastBedPos = a_Pos; } + /** Update movement-related statistics. */ void UpdateMovementStats(const Vector3d & a_DeltaPos); /** Returns wheter the player can fly or not. */ virtual bool CanFly(void) const { return m_CanFly; } + + // tolua_end // cEntity overrides: @@ -450,6 +458,9 @@ protected: cWindow * m_CurrentWindow; cWindow * m_InventoryWindow; + /** The player's last saved bed position */ + Vector3i m_LastBedPos; + char m_Color; eGameMode m_GameMode; @@ -508,8 +519,6 @@ protected: cStatManager m_Stats; - - void ResolvePermissions(void); void ResolveGroups(void); |