diff options
Diffstat (limited to '')
-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. |