summaryrefslogtreecommitdiffstats
path: root/src/Entities/EntityEffect.cpp
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2014-08-01 17:43:18 +0200
committerMattes D <github@xoft.cz>2014-08-01 17:43:18 +0200
commitd2744713bb69ca7c6211fe9b7bdf6fcadd2cadc8 (patch)
tree20fd08c3d16c6e21bfec17b3252b8cd48c923e59 /src/Entities/EntityEffect.cpp
parentMerge pull request #1269 from Howaner/BlockEntitys (diff)
parentCompile fix. (diff)
downloadcuberite-d2744713bb69ca7c6211fe9b7bdf6fcadd2cadc8.tar
cuberite-d2744713bb69ca7c6211fe9b7bdf6fcadd2cadc8.tar.gz
cuberite-d2744713bb69ca7c6211fe9b7bdf6fcadd2cadc8.tar.bz2
cuberite-d2744713bb69ca7c6211fe9b7bdf6fcadd2cadc8.tar.lz
cuberite-d2744713bb69ca7c6211fe9b7bdf6fcadd2cadc8.tar.xz
cuberite-d2744713bb69ca7c6211fe9b7bdf6fcadd2cadc8.tar.zst
cuberite-d2744713bb69ca7c6211fe9b7bdf6fcadd2cadc8.zip
Diffstat (limited to 'src/Entities/EntityEffect.cpp')
-rw-r--r--src/Entities/EntityEffect.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Entities/EntityEffect.cpp b/src/Entities/EntityEffect.cpp
index fdcbe822e..39314f256 100644
--- a/src/Entities/EntityEffect.cpp
+++ b/src/Entities/EntityEffect.cpp
@@ -309,7 +309,7 @@ void cEntityEffectHunger::OnTick(cPawn & a_Target)
if (a_Target.IsPlayer())
{
cPlayer & Target = (cPlayer &) a_Target;
- Target.SetFoodExhaustionLevel(Target.GetFoodExhaustionLevel() + 0.025); // 0.5 per second = 0.025 per tick
+ Target.AddFoodExhaustion(0.025 * ((double)GetIntensity() + 1.0)); // 0.5 per second = 0.025 per tick
}
}