summaryrefslogtreecommitdiffstats
path: root/src/Mobs/Slime.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Mobs/Slime.cpp')
-rw-r--r--src/Mobs/Slime.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Mobs/Slime.cpp b/src/Mobs/Slime.cpp
index 316f68523..e4ef069ec 100644
--- a/src/Mobs/Slime.cpp
+++ b/src/Mobs/Slime.cpp
@@ -78,10 +78,10 @@ void cSlime::KilledBy(TakeDamageInfo & a_TDI)
double AddX = (i % 2 - 0.5) * m_Size / 4.0;
double AddZ = (i / 2 - 0.5) * m_Size / 4.0;
- cSlime * NewSlime = new cSlime(m_Size / 2);
+ auto NewSlime = cpp14::make_unique<cSlime>(m_Size / 2);
NewSlime->SetPosition(GetPosX() + AddX, GetPosY() + 0.5, GetPosZ() + AddZ);
NewSlime->SetYaw(Random.NextFloat(1.0f) * 360.0f);
- m_World->SpawnMobFinalize(NewSlime);
+ m_World->SpawnMobFinalize(std::move(NewSlime));
}
}
super::KilledBy(a_TDI);