diff options
author | Alexander Harkness <bearbin@gmail.com> | 2013-08-09 10:06:30 +0200 |
---|---|---|
committer | Alexander Harkness <bearbin@gmail.com> | 2013-08-09 10:06:30 +0200 |
commit | 6f2c099f707eb1f9429ca685725e9c0aef273d7c (patch) | |
tree | 5763e0d8fa66b9a3e27517570375bc67b3654176 /source/ClientHandle.cpp | |
parent | Fixed a copypasta error in hook function names. (diff) | |
parent | Fixed some formatting issues I accidentally introduced (diff) | |
download | cuberite-6f2c099f707eb1f9429ca685725e9c0aef273d7c.tar cuberite-6f2c099f707eb1f9429ca685725e9c0aef273d7c.tar.gz cuberite-6f2c099f707eb1f9429ca685725e9c0aef273d7c.tar.bz2 cuberite-6f2c099f707eb1f9429ca685725e9c0aef273d7c.tar.lz cuberite-6f2c099f707eb1f9429ca685725e9c0aef273d7c.tar.xz cuberite-6f2c099f707eb1f9429ca685725e9c0aef273d7c.tar.zst cuberite-6f2c099f707eb1f9429ca685725e9c0aef273d7c.zip |
Diffstat (limited to 'source/ClientHandle.cpp')
-rw-r--r-- | source/ClientHandle.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/source/ClientHandle.cpp b/source/ClientHandle.cpp index 52c4b3061..85500a2e4 100644 --- a/source/ClientHandle.cpp +++ b/source/ClientHandle.cpp @@ -505,7 +505,12 @@ void cClientHandle::HandlePlayerPos(double a_PosX, double a_PosY, double a_PosZ, // If a jump just started, process food exhaustion: if ((a_PosY > m_Player->GetPosY()) && !a_IsOnGround && m_Player->IsOnGround()) { - m_Player->AddFoodExhaustion(m_Player->IsSprinting() ? 0.8 : 0.2); + // we only add this exhaustion if the player is not swimming - otherwise we end up with both jump + swim exhaustion + + if(! m_Player->IsSwimming() ) + { + m_Player->AddFoodExhaustion(m_Player->IsSprinting() ? 0.8 : 0.2); + } } m_Player->MoveTo(Pos); |