summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2014-04-27 00:52:18 +0200
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2014-04-27 00:52:18 +0200
commit15767badac8f1832dad93afa39b4678f611ce697 (patch)
treed95f298bf60a4f9c7d587747290c2b8d69373d57 /src
parentMore comments! (diff)
downloadcuberite-15767badac8f1832dad93afa39b4678f611ce697.tar
cuberite-15767badac8f1832dad93afa39b4678f611ce697.tar.gz
cuberite-15767badac8f1832dad93afa39b4678f611ce697.tar.bz2
cuberite-15767badac8f1832dad93afa39b4678f611ce697.tar.lz
cuberite-15767badac8f1832dad93afa39b4678f611ce697.tar.xz
cuberite-15767badac8f1832dad93afa39b4678f611ce697.tar.zst
cuberite-15767badac8f1832dad93afa39b4678f611ce697.zip
Diffstat (limited to '')
-rw-r--r--src/Entities/Player.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/Entities/Player.cpp b/src/Entities/Player.cpp
index a7b1dd74e..b43205226 100644
--- a/src/Entities/Player.cpp
+++ b/src/Entities/Player.cpp
@@ -1848,16 +1848,16 @@ void cPlayer::ApplyFoodExhaustionFromMovement()
{
return;
}
-
- // Calculate the distance travelled, update the last pos:
- Vector3d Movement(GetPosition() - m_LastPos);
- Movement.y = 0; // Only take XZ movement into account
-
+
// If riding anything, apply no food exhaustion
if (m_AttachedTo != NULL)
{
return;
}
+
+ // Calculate the distance travelled, update the last pos:
+ Vector3d Movement(GetPosition() - m_LastPos);
+ Movement.y = 0; // Only take XZ movement into account
// Apply the exhaustion based on distance travelled:
double BaseExhaustion = Movement.Length();