summaryrefslogtreecommitdiffstats
path: root/src/Mobs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Mobs')
-rw-r--r--src/Mobs/Chicken.cpp2
-rw-r--r--src/Mobs/Monster.cpp4
-rw-r--r--src/Mobs/Mooshroom.cpp2
-rw-r--r--src/Mobs/Pig.cpp2
-rw-r--r--src/Mobs/Sheep.cpp2
5 files changed, 6 insertions, 6 deletions
diff --git a/src/Mobs/Chicken.cpp b/src/Mobs/Chicken.cpp
index bb0a4efbf..cc9609450 100644
--- a/src/Mobs/Chicken.cpp
+++ b/src/Mobs/Chicken.cpp
@@ -40,7 +40,7 @@ void cChicken::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
{
cItems Drops;
m_EggDropTimer = 0;
- Drops.emplace_back(E_ITEM_EGG, char(1));
+ Drops.emplace_back(E_ITEM_EGG, static_cast<char>(1));
m_World->SpawnItemPickups(Drops, GetPosX(), GetPosY(), GetPosZ(), 10);
}
else
diff --git a/src/Mobs/Monster.cpp b/src/Mobs/Monster.cpp
index c6f786eac..e05264f9f 100644
--- a/src/Mobs/Monster.cpp
+++ b/src/Mobs/Monster.cpp
@@ -1511,7 +1511,7 @@ void cMonster::RightClickFeed(cPlayer & a_Player)
void cMonster::AddRandomDropItem(cItems & a_Drops, unsigned int a_Min, unsigned int a_Max, short a_Item, short a_ItemHealth)
{
auto Count = GetRandomProvider().RandInt(a_Min, a_Max);
- char MaxStackSize = cItem(a_Item).GetMaxStackSize();
+ auto MaxStackSize = static_cast<unsigned int>(cItem(a_Item).GetMaxStackSize());
while (Count > MaxStackSize)
{
a_Drops.emplace_back(a_Item, MaxStackSize, a_ItemHealth);
@@ -1531,7 +1531,7 @@ void cMonster::AddRandomUncommonDropItem(cItems & a_Drops, float a_Chance, short
{
if (GetRandomProvider().RandBool(a_Chance / 100.0))
{
- a_Drops.emplace_back(a_Item, char(1), a_ItemHealth);
+ a_Drops.emplace_back(a_Item, static_cast<char>(1), a_ItemHealth);
}
}
diff --git a/src/Mobs/Mooshroom.cpp b/src/Mobs/Mooshroom.cpp
index 3e4cb7154..35eb7f3d1 100644
--- a/src/Mobs/Mooshroom.cpp
+++ b/src/Mobs/Mooshroom.cpp
@@ -65,7 +65,7 @@ void cMooshroom::OnRightClicked(cPlayer & a_Player)
}
cItems Drops;
- Drops.emplace_back(E_BLOCK_RED_MUSHROOM, char(5), char(0));
+ Drops.emplace_back(E_BLOCK_RED_MUSHROOM, static_cast<char>(5), static_cast<char>(0));
m_World->SpawnItemPickups(Drops, GetPosX(), GetPosY(), GetPosZ(), 10);
m_World->SpawnMob(GetPosX(), GetPosY(), GetPosZ(), mtCow, false);
Destroy();
diff --git a/src/Mobs/Pig.cpp b/src/Mobs/Pig.cpp
index dc26caca9..5e7c18bf8 100644
--- a/src/Mobs/Pig.cpp
+++ b/src/Mobs/Pig.cpp
@@ -34,7 +34,7 @@ void cPig::GetDrops(cItems & a_Drops, cEntity * a_Killer)
AddRandomDropItem(a_Drops, 1, 3 + LootingLevel, IsOnFire() ? E_ITEM_COOKED_PORKCHOP : E_ITEM_RAW_PORKCHOP);
if (m_bIsSaddled)
{
- a_Drops.emplace_back(E_ITEM_SADDLE, char(1));
+ a_Drops.emplace_back(E_ITEM_SADDLE, static_cast<char>(1));
}
}
diff --git a/src/Mobs/Sheep.cpp b/src/Mobs/Sheep.cpp
index 14d8dd8d8..be4def2b7 100644
--- a/src/Mobs/Sheep.cpp
+++ b/src/Mobs/Sheep.cpp
@@ -42,7 +42,7 @@ void cSheep::GetDrops(cItems & a_Drops, cEntity * a_Killer)
if (!m_IsSheared)
{
- a_Drops.emplace_back(E_BLOCK_WOOL, char(1), static_cast<short>(m_WoolColor));
+ a_Drops.emplace_back(E_BLOCK_WOOL, static_cast<char>(1), static_cast<short>(m_WoolColor));
}
unsigned int LootingLevel = 0;