summaryrefslogtreecommitdiffstats
path: root/src/Entities/Player.cpp
diff options
context:
space:
mode:
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))
{