summaryrefslogtreecommitdiffstats
path: root/src/Mobs
diff options
context:
space:
mode:
author12xx12 <44411062+12xx12@users.noreply.github.com>2021-03-07 17:31:43 +0100
committerGitHub <noreply@github.com>2021-03-07 17:31:43 +0100
commit3daf253b7f4ed8243e3262faee35219335e3e088 (patch)
tree72d7c719838d23c979fdc57f1d6053bab38d8275 /src/Mobs
parentMitigate MSVC crash (#5146) (diff)
downloadcuberite-3daf253b7f4ed8243e3262faee35219335e3e088.tar
cuberite-3daf253b7f4ed8243e3262faee35219335e3e088.tar.gz
cuberite-3daf253b7f4ed8243e3262faee35219335e3e088.tar.bz2
cuberite-3daf253b7f4ed8243e3262faee35219335e3e088.tar.lz
cuberite-3daf253b7f4ed8243e3262faee35219335e3e088.tar.xz
cuberite-3daf253b7f4ed8243e3262faee35219335e3e088.tar.zst
cuberite-3daf253b7f4ed8243e3262faee35219335e3e088.zip
Diffstat (limited to '')
-rw-r--r--src/Mobs/Chicken.cpp2
-rw-r--r--src/Mobs/Monster.cpp2
-rw-r--r--src/Mobs/Mooshroom.cpp2
-rw-r--r--src/Mobs/Pig.cpp2
-rw-r--r--src/Mobs/Sheep.cpp2
5 files changed, 5 insertions, 5 deletions
diff --git a/src/Mobs/Chicken.cpp b/src/Mobs/Chicken.cpp
index 71bd80af4..eacbd482d 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.push_back(cItem(E_ITEM_EGG, 1));
+ Drops.emplace_back(E_ITEM_EGG, 1);
m_World->SpawnItemPickups(Drops, GetPosX(), GetPosY(), GetPosZ(), 10);
}
else
diff --git a/src/Mobs/Monster.cpp b/src/Mobs/Monster.cpp
index b115b241a..237c50524 100644
--- a/src/Mobs/Monster.cpp
+++ b/src/Mobs/Monster.cpp
@@ -1521,7 +1521,7 @@ void cMonster::AddRandomUncommonDropItem(cItems & a_Drops, float a_Chance, short
{
if (GetRandomProvider().RandBool(a_Chance / 100.0))
{
- a_Drops.push_back(cItem(a_Item, 1, a_ItemHealth));
+ a_Drops.emplace_back(a_Item, 1, a_ItemHealth);
}
}
diff --git a/src/Mobs/Mooshroom.cpp b/src/Mobs/Mooshroom.cpp
index 1190f46e9..6318cdef2 100644
--- a/src/Mobs/Mooshroom.cpp
+++ b/src/Mobs/Mooshroom.cpp
@@ -65,7 +65,7 @@ void cMooshroom::OnRightClicked(cPlayer & a_Player)
}
cItems Drops;
- Drops.push_back(cItem(E_BLOCK_RED_MUSHROOM, 5, 0));
+ Drops.emplace_back(E_BLOCK_RED_MUSHROOM, 5, 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 1e531aebd..2bcb94f2b 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.push_back(cItem(E_ITEM_SADDLE, 1));
+ a_Drops.emplace_back(E_ITEM_SADDLE, 1);
}
}
diff --git a/src/Mobs/Sheep.cpp b/src/Mobs/Sheep.cpp
index 7bcfe1836..e208420db 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.push_back(cItem(E_BLOCK_WOOL, 1, static_cast<short>(m_WoolColor)));
+ a_Drops.emplace_back(E_BLOCK_WOOL, 1, static_cast<short>(m_WoolColor));
}
unsigned int LootingLevel = 0;