summaryrefslogtreecommitdiffstats
path: root/src/Items/ItemHandler.cpp
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2016-11-13 20:00:01 +0100
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2016-11-13 20:00:01 +0100
commit944fdd173f40c0fcc718d6aa2af191bf993adc70 (patch)
tree28436adf7e20c58427c8d48685d944b964e11147 /src/Items/ItemHandler.cpp
parentMerge pull request #3430 from cuberite/Overrides (diff)
downloadcuberite-WarningsFixes.tar
cuberite-WarningsFixes.tar.gz
cuberite-WarningsFixes.tar.bz2
cuberite-WarningsFixes.tar.lz
cuberite-WarningsFixes.tar.xz
cuberite-WarningsFixes.tar.zst
cuberite-WarningsFixes.zip
Diffstat (limited to 'src/Items/ItemHandler.cpp')
-rw-r--r--src/Items/ItemHandler.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Items/ItemHandler.cpp b/src/Items/ItemHandler.cpp
index 6984b6111..5c2721381 100644
--- a/src/Items/ItemHandler.cpp
+++ b/src/Items/ItemHandler.cpp
@@ -842,7 +842,7 @@ bool cItemHandler::EatItem(cPlayer * a_Player, cItem * a_Item)
}
FoodInfo Info = GetFoodInfo();
- if ((Info.FoodLevel > 0) || (Info.Saturation > 0.f))
+ if ((Info.FoodLevel > 0) || (Info.Saturation > 0))
{
bool Success = a_Player->Feed(Info.FoodLevel, Info.Saturation);
@@ -856,7 +856,7 @@ bool cItemHandler::EatItem(cPlayer * a_Player, cItem * a_Item)
cFastRandom r1;
if (r1.NextFloat() < Chance)
{
- a_Player->AddEntityEffect(EffectType, EffectDurationTicks, EffectIntensity, Chance);
+ a_Player->AddEntityEffect(EffectType, EffectDurationTicks, EffectIntensity, static_cast<double>(Chance));
}
}
return Success;