summaryrefslogtreecommitdiffstats
path: root/src/Entities/Player.cpp
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2014-06-28 22:10:59 +0200
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2014-06-28 22:10:59 +0200
commit35dc056f0350c5fda178d0c28230f0a6b0feabbc (patch)
tree00aa83ba4d20db8f72f96fb79086718df6aa49e4 /src/Entities/Player.cpp
parentFixed issue with breaking blocks at -1 coordinates (diff)
downloadcuberite-35dc056f0350c5fda178d0c28230f0a6b0feabbc.tar
cuberite-35dc056f0350c5fda178d0c28230f0a6b0feabbc.tar.gz
cuberite-35dc056f0350c5fda178d0c28230f0a6b0feabbc.tar.bz2
cuberite-35dc056f0350c5fda178d0c28230f0a6b0feabbc.tar.lz
cuberite-35dc056f0350c5fda178d0c28230f0a6b0feabbc.tar.xz
cuberite-35dc056f0350c5fda178d0c28230f0a6b0feabbc.tar.zst
cuberite-35dc056f0350c5fda178d0c28230f0a6b0feabbc.zip
Diffstat (limited to 'src/Entities/Player.cpp')
-rw-r--r--src/Entities/Player.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Entities/Player.cpp b/src/Entities/Player.cpp
index 7b4fd219d..0abe50d11 100644
--- a/src/Entities/Player.cpp
+++ b/src/Entities/Player.cpp
@@ -1913,7 +1913,7 @@ void cPlayer::HandleFood(void)
{
m_FoodTickTimer = 0;
- if (m_FoodLevel >= 17)
+ if ((m_FoodLevel > 17) && (GetHealth() < GetMaxHealth()))
{
// Regenerate health from food, incur 3 pts of food exhaustion:
Heal(1);