summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlexander Harkness <me@bearbin.net>2015-05-19 19:02:43 +0200
committerAlexander Harkness <me@bearbin.net>2015-05-19 19:02:43 +0200
commit0c06ec6abdad2f7754cffba566b6d7a562677c4a (patch)
tree813ff1786aced2b37c095fb60c42bcf121bba956 /src
parentMerge pull request #2019 from mc-server/OverrideArgs (diff)
parentFix the health of animals (diff)
downloadcuberite-0c06ec6abdad2f7754cffba566b6d7a562677c4a.tar
cuberite-0c06ec6abdad2f7754cffba566b6d7a562677c4a.tar.gz
cuberite-0c06ec6abdad2f7754cffba566b6d7a562677c4a.tar.bz2
cuberite-0c06ec6abdad2f7754cffba566b6d7a562677c4a.tar.lz
cuberite-0c06ec6abdad2f7754cffba566b6d7a562677c4a.tar.xz
cuberite-0c06ec6abdad2f7754cffba566b6d7a562677c4a.tar.zst
cuberite-0c06ec6abdad2f7754cffba566b6d7a562677c4a.zip
Diffstat (limited to '')
-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 00b34bddd..69ae59c18 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);