summaryrefslogtreecommitdiffstats
path: root/src/Entities/Player.cpp
diff options
context:
space:
mode:
authorarchshift <admin@archshift.com>2014-08-03 07:42:53 +0200
committerarchshift <admin@archshift.com>2014-08-11 00:06:59 +0200
commitdba672361164dc5dc5f94d24bde3176c7de89d4c (patch)
tree6ce4fe45e2dda750c213c27b91b1b5c1f0ac67f1 /src/Entities/Player.cpp
parentMerge pull request #1311 from mc-server/CMakeFix (diff)
downloadcuberite-dba672361164dc5dc5f94d24bde3176c7de89d4c.tar
cuberite-dba672361164dc5dc5f94d24bde3176c7de89d4c.tar.gz
cuberite-dba672361164dc5dc5f94d24bde3176c7de89d4c.tar.bz2
cuberite-dba672361164dc5dc5f94d24bde3176c7de89d4c.tar.lz
cuberite-dba672361164dc5dc5f94d24bde3176c7de89d4c.tar.xz
cuberite-dba672361164dc5dc5f94d24bde3176c7de89d4c.tar.zst
cuberite-dba672361164dc5dc5f94d24bde3176c7de89d4c.zip
Diffstat (limited to '')
-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 608316e9a..91bcddca3 100644
--- a/src/Entities/Player.cpp
+++ b/src/Entities/Player.cpp
@@ -509,7 +509,7 @@ void cPlayer::Heal(int a_Health)
void cPlayer::SetFoodLevel(int a_FoodLevel)
{
- int FoodLevel = std::max(0, std::min(a_FoodLevel, (int)MAX_FOOD_LEVEL));
+ int FoodLevel = Clamp(a_FoodLevel, 0, MAX_FOOD_LEVEL);
if (cRoot::Get()->GetPluginManager()->CallHookPlayerFoodLevelChange(*this, FoodLevel))
{