diff options
Diffstat (limited to '')
-rw-r--r-- | src/Items/ItemFood.h | 2 | ||||
-rw-r--r-- | src/Items/ItemHandler.cpp | 4 | ||||
-rw-r--r-- | src/Items/ItemMobHead.h | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/src/Items/ItemFood.h b/src/Items/ItemFood.h index cfdac26c6..5111d4087 100644 --- a/src/Items/ItemFood.h +++ b/src/Items/ItemFood.h @@ -59,7 +59,7 @@ public: case E_ITEM_STEAK: return FoodInfo(8, 12.8); } LOGWARNING("%s: Unknown food item (%d), returning zero nutrition", __FUNCTION__, m_ItemType); - return FoodInfo(0, 0.f); + return FoodInfo(0, 0); } virtual bool GetEatEffect(cEntityEffect::eType & a_EffectType, int & a_EffectDurationTicks, short & a_EffectIntensity, float & a_Chance) override 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; diff --git a/src/Items/ItemMobHead.h b/src/Items/ItemMobHead.h index fdecabbbf..9af4cb14d 100644 --- a/src/Items/ItemMobHead.h +++ b/src/Items/ItemMobHead.h @@ -80,7 +80,7 @@ public: int Rotation = 0; if (m_BlockMeta == 1) { - Rotation = FloorC(m_Player.GetYaw() * 16.0f / 360.0f + 0.5f) & 0x0f; + Rotation = FloorC(m_Player.GetYaw() * 16.0 / 360.0 + 0.5) & 0x0f; } MobHeadEntity->SetType(m_HeadType); |