summaryrefslogtreecommitdiffstats
path: root/src/Entities/Player.cpp
diff options
context:
space:
mode:
authorAlexander Harkness <me@bearbin.net>2018-01-14 19:44:45 +0100
committerpeterbell10 <peterbell10@live.co.uk>2018-01-14 19:44:45 +0100
commitad22922393c7982b885840960222de64ff96ad36 (patch)
treea028b7459f3c865f7e8bd563ae476c578763a9b1 /src/Entities/Player.cpp
parentTravis: Remove gdb (#4140) (diff)
downloadcuberite-ad22922393c7982b885840960222de64ff96ad36.tar
cuberite-ad22922393c7982b885840960222de64ff96ad36.tar.gz
cuberite-ad22922393c7982b885840960222de64ff96ad36.tar.bz2
cuberite-ad22922393c7982b885840960222de64ff96ad36.tar.lz
cuberite-ad22922393c7982b885840960222de64ff96ad36.tar.xz
cuberite-ad22922393c7982b885840960222de64ff96ad36.tar.zst
cuberite-ad22922393c7982b885840960222de64ff96ad36.zip
Diffstat (limited to 'src/Entities/Player.cpp')
-rw-r--r--src/Entities/Player.cpp10
1 files changed, 1 insertions, 9 deletions
diff --git a/src/Entities/Player.cpp b/src/Entities/Player.cpp
index 073d00909..7b6719f55 100644
--- a/src/Entities/Player.cpp
+++ b/src/Entities/Player.cpp
@@ -92,9 +92,6 @@ 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);
@@ -2503,12 +2500,7 @@ void cPlayer::UpdateMovementStats(const Vector3d & a_DeltaPos, bool a_PreviousIs
m_Stats.AddValue(statDistClimbed, FloorC<StatValue>(a_DeltaPos.y * 100 + 0.5));
}
}
- else if (IsSubmerged())
- {
- m_Stats.AddValue(statDistDove, Value);
- AddFoodExhaustion(0.00015 * static_cast<double>(Value));
- }
- else if (IsSwimming())
+ else if (IsInWater())
{
m_Stats.AddValue(statDistSwum, Value);
AddFoodExhaustion(0.00015 * static_cast<double>(Value));