summaryrefslogtreecommitdiffstats
path: root/src/Generating/FinishGen.cpp
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2016-12-19 21:12:23 +0100
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2017-08-07 20:24:16 +0200
commit4ef47aed62364f9cf1474864e5cf94232b4477af (patch)
tree28ca15247c2437b91e9aada48c2da4a1a3c00c17 /src/Generating/FinishGen.cpp
parentRemoved unneeded includes (#3902) (diff)
downloadcuberite-4ef47aed62364f9cf1474864e5cf94232b4477af.tar
cuberite-4ef47aed62364f9cf1474864e5cf94232b4477af.tar.gz
cuberite-4ef47aed62364f9cf1474864e5cf94232b4477af.tar.bz2
cuberite-4ef47aed62364f9cf1474864e5cf94232b4477af.tar.lz
cuberite-4ef47aed62364f9cf1474864e5cf94232b4477af.tar.xz
cuberite-4ef47aed62364f9cf1474864e5cf94232b4477af.tar.zst
cuberite-4ef47aed62364f9cf1474864e5cf94232b4477af.zip
Diffstat (limited to '')
-rw-r--r--src/Generating/FinishGen.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Generating/FinishGen.cpp b/src/Generating/FinishGen.cpp
index d1201797c..fe5ce82be 100644
--- a/src/Generating/FinishGen.cpp
+++ b/src/Generating/FinishGen.cpp
@@ -1489,11 +1489,11 @@ bool cFinishGenPassiveMobs::TrySpawnAnimals(cChunkDesc & a_ChunkDesc, int a_RelX
double AnimalY = a_RelY;
double AnimalZ = static_cast<double>(a_ChunkDesc.GetChunkZ() * cChunkDef::Width + a_RelZ + 0.5);
- cMonster * NewMob = cMonster::NewMonsterFromType(AnimalToSpawn);
+ auto NewMob = cMonster::NewMonsterFromType(AnimalToSpawn);
NewMob->SetHealth(NewMob->GetMaxHealth());
NewMob->SetPosition(AnimalX, AnimalY, AnimalZ);
- a_ChunkDesc.GetEntities().push_back(NewMob);
LOGD("Spawning %s #%i at {%.02f, %.02f, %.02f}", NewMob->GetClass(), NewMob->GetUniqueID(), AnimalX, AnimalY, AnimalZ);
+ a_ChunkDesc.GetEntities().emplace_back(std::move(NewMob));
return true;
}