diff options
author | Lukas Pioch <lukas@zgow.de> | 2017-05-20 08:16:28 +0200 |
---|---|---|
committer | Lukas Pioch <lukas@zgow.de> | 2017-05-21 12:19:06 +0200 |
commit | e35ac1bfb9b63bf1e49dafdcce2033ff42d7c205 (patch) | |
tree | bbd086b1dbf8545575ce5da9ac3b2b7128e19899 /src/Entities | |
parent | Fixed invisible chests (#3722) (diff) | |
download | cuberite-e35ac1bfb9b63bf1e49dafdcce2033ff42d7c205.tar cuberite-e35ac1bfb9b63bf1e49dafdcce2033ff42d7c205.tar.gz cuberite-e35ac1bfb9b63bf1e49dafdcce2033ff42d7c205.tar.bz2 cuberite-e35ac1bfb9b63bf1e49dafdcce2033ff42d7c205.tar.lz cuberite-e35ac1bfb9b63bf1e49dafdcce2033ff42d7c205.tar.xz cuberite-e35ac1bfb9b63bf1e49dafdcce2033ff42d7c205.tar.zst cuberite-e35ac1bfb9b63bf1e49dafdcce2033ff42d7c205.zip |
Diffstat (limited to 'src/Entities')
-rw-r--r-- | src/Entities/Pawn.h | 2 | ||||
-rw-r--r-- | src/Entities/Player.cpp | 5 | ||||
-rw-r--r-- | src/Entities/Player.h | 4 |
3 files changed, 5 insertions, 6 deletions
diff --git a/src/Entities/Pawn.h b/src/Entities/Pawn.h index e2444e9a0..e6aae4f49 100644 --- a/src/Entities/Pawn.h +++ b/src/Entities/Pawn.h @@ -22,7 +22,7 @@ public: CLASS_PROTODEF(cPawn) cPawn(eEntityType a_EntityType, double a_Width, double a_Height); - ~cPawn(); + virtual ~cPawn() override; virtual void Destroyed() override; virtual void Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk) override; diff --git a/src/Entities/Player.cpp b/src/Entities/Player.cpp index 7fa17f0f5..94398c258 100644 --- a/src/Entities/Player.cpp +++ b/src/Entities/Player.cpp @@ -74,8 +74,6 @@ cPlayer::cPlayer(cClientHandlePtr a_Client, const AString & a_PlayerName) : m_IsCrouched(false), m_IsSprinting(false), m_IsFlying(false), - m_IsSwimming(false), - m_IsSubmerged(false), m_IsFishing(false), m_CanFly(false), m_EatingFinishTick(-1), @@ -96,6 +94,9 @@ cPlayer::cPlayer(cClientHandlePtr a_Client, const AString & a_PlayerName) : { ASSERT(a_PlayerName.length() <= 16); // Otherwise this player could crash many clients... + m_IsSwimming = false; + m_IsSubmerged = false; + m_InventoryWindow = new cInventoryWindow(*this); m_CurrentWindow = m_InventoryWindow; m_InventoryWindow->OpenedByPlayer(*this); diff --git a/src/Entities/Player.h b/src/Entities/Player.h index 058ece26e..02f187e31 100644 --- a/src/Entities/Player.h +++ b/src/Entities/Player.h @@ -43,7 +43,7 @@ public: virtual bool Initialize(cWorld & a_World) override; - virtual ~cPlayer(); + virtual ~cPlayer() override; virtual void SpawnOn(cClientHandle & a_Client) override; @@ -645,8 +645,6 @@ protected: bool m_IsCrouched; bool m_IsSprinting; bool m_IsFlying; - bool m_IsSwimming; - bool m_IsSubmerged; bool m_IsFishing; bool m_CanFly; // If this is true the player can fly. Even if he is not in creative. |