summaryrefslogtreecommitdiffstats
path: root/src/Entities/Player.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/Entities/Player.h')
-rw-r--r--src/Entities/Player.h17
1 files changed, 13 insertions, 4 deletions
diff --git a/src/Entities/Player.h b/src/Entities/Player.h
index b7cb27d6c..5c0b61064 100644
--- a/src/Entities/Player.h
+++ b/src/Entities/Player.h
@@ -328,10 +328,10 @@ public:
void SetVisible( bool a_bVisible ); // tolua_export
bool IsVisible(void) const { return m_bVisible; } // tolua_export
- bool MoveToWorld(const char * a_WorldName); // tolua_export
+ 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);