summaryrefslogtreecommitdiffstats
path: root/src/Entities/Player.cpp
diff options
context:
space:
mode:
authorHowaner <franzi.moos@googlemail.com>2014-06-30 21:50:40 +0200
committerHowaner <franzi.moos@googlemail.com>2014-06-30 21:50:40 +0200
commit8e11f7a1f64fd4d20495f1a4467ef168d18db92b (patch)
tree5a5de6613ff994015b0dfd03522d2a0323e92e15 /src/Entities/Player.cpp
parentAdd documentation. (diff)
downloadcuberite-8e11f7a1f64fd4d20495f1a4467ef168d18db92b.tar
cuberite-8e11f7a1f64fd4d20495f1a4467ef168d18db92b.tar.gz
cuberite-8e11f7a1f64fd4d20495f1a4467ef168d18db92b.tar.bz2
cuberite-8e11f7a1f64fd4d20495f1a4467ef168d18db92b.tar.lz
cuberite-8e11f7a1f64fd4d20495f1a4467ef168d18db92b.tar.xz
cuberite-8e11f7a1f64fd4d20495f1a4467ef168d18db92b.tar.zst
cuberite-8e11f7a1f64fd4d20495f1a4467ef168d18db92b.zip
Diffstat (limited to '')
-rw-r--r--src/Entities/Player.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Entities/Player.cpp b/src/Entities/Player.cpp
index ed18d2ab7..ab2dbc0cf 100644
--- a/src/Entities/Player.cpp
+++ b/src/Entities/Player.cpp
@@ -521,15 +521,15 @@ void cPlayer::Heal(int a_Health)
void cPlayer::SetFoodLevel(int a_FoodLevel)
{
- a_FoodLevel = std::max(0, std::min(a_FoodLevel, (int)MAX_FOOD_LEVEL));
+ int FoodLevel = std::max(0, std::min(a_FoodLevel, (int)MAX_FOOD_LEVEL));
- if (cRoot::Get()->GetPluginManager()->CallHookPlayerFoodLevelChange(*this, a_FoodLevel))
+ if (cRoot::Get()->GetPluginManager()->CallHookPlayerFoodLevelChange(*this, FoodLevel))
{
m_FoodSaturationLevel = 5.0;
return;
}
- m_FoodLevel = a_FoodLevel;
+ m_FoodLevel = FoodLevel;
SendHealth();
}