summaryrefslogtreecommitdiffstats
path: root/src/Generating/FinishGen.cpp
diff options
context:
space:
mode:
authortycho <work.tycho@gmail.com>2015-05-19 20:40:39 +0200
committertycho <work.tycho@gmail.com>2015-05-19 20:40:39 +0200
commit813c95d4b0201ab89c6f0a8ac58d7dcb370218ee (patch)
tree52e72880a11e6f1ec447fac07d622ac45a54b083 /src/Generating/FinishGen.cpp
parentMake -Werror disabling file only (diff)
parentMerge branch 'master' of github.com:mc-server/MCServer (diff)
downloadcuberite-813c95d4b0201ab89c6f0a8ac58d7dcb370218ee.tar
cuberite-813c95d4b0201ab89c6f0a8ac58d7dcb370218ee.tar.gz
cuberite-813c95d4b0201ab89c6f0a8ac58d7dcb370218ee.tar.bz2
cuberite-813c95d4b0201ab89c6f0a8ac58d7dcb370218ee.tar.lz
cuberite-813c95d4b0201ab89c6f0a8ac58d7dcb370218ee.tar.xz
cuberite-813c95d4b0201ab89c6f0a8ac58d7dcb370218ee.tar.zst
cuberite-813c95d4b0201ab89c6f0a8ac58d7dcb370218ee.zip
Diffstat (limited to 'src/Generating/FinishGen.cpp')
-rw-r--r--src/Generating/FinishGen.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/Generating/FinishGen.cpp b/src/Generating/FinishGen.cpp
index af4056e8c..e0349f012 100644
--- a/src/Generating/FinishGen.cpp
+++ b/src/Generating/FinishGen.cpp
@@ -1274,6 +1274,7 @@ bool cFinishGenPassiveMobs::TrySpawnAnimals(cChunkDesc & a_ChunkDesc, int a_RelX
double AnimalZ = static_cast<double>(a_ChunkDesc.GetChunkZ() * cChunkDef::Width + a_RelZ + 0.5);
cMonster * 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);