formatting fixes
This commit is contained in:
parent
99a5b38e27
commit
53a33595b7
@ -1049,12 +1049,14 @@ bool cFinishGenPassiveMobs::TrySpawnAnimals(cChunkDesc & a_ChunkDesc, int a_RelX
|
|||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if ((BlockUnderFeet != E_BLOCK_GRASS) &&
|
if (
|
||||||
((AnimalToSpawn == mtSheep) || (AnimalToSpawn == mtChicken) || (AnimalToSpawn == mtPig)))
|
(BlockUnderFeet != E_BLOCK_GRASS) &&
|
||||||
|
((AnimalToSpawn == mtSheep) || (AnimalToSpawn == mtChicken) || (AnimalToSpawn == mtPig))
|
||||||
|
)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (AnimalToSpawn == mtMooshroom && BlockUnderFeet != E_BLOCK_MYCELIUM)
|
if ((AnimalToSpawn == mtMooshroom) && (BlockUnderFeet != E_BLOCK_MYCELIUM))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -1150,13 +1152,18 @@ eMonsterType cFinishGenPassiveMobs::GetRandomMob(cChunkDesc & a_ChunkDesc)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ListOfSpawnables.insert(MobIter, mtChicken);
|
||||||
|
ListOfSpawnables.insert(MobIter, mtCow);
|
||||||
|
ListOfSpawnables.insert(MobIter, mtPig);
|
||||||
|
ListOfSpawnables.insert(MobIter, mtSheep);
|
||||||
|
|
||||||
if (ListOfSpawnables.empty())
|
if (ListOfSpawnables.empty())
|
||||||
{
|
{
|
||||||
return mtInvalidType;
|
return mtInvalidType;
|
||||||
}
|
}
|
||||||
|
|
||||||
int RandMob = (m_Noise.IntNoise2DInt(chunkX - chunkZ + 2, chunkX + 5) / 7) % ListOfSpawnables.size();
|
int RandMob = (m_Noise.IntNoise2DInt(chunkX - chunkZ + 2, chunkX + 5) / 7) % ListOfSpawnables.size();
|
||||||
MobIter=ListOfSpawnables.begin();
|
MobIter = ListOfSpawnables.begin();
|
||||||
for (int i = 0; i < RandMob; i++)
|
for (int i = 0; i < RandMob; i++)
|
||||||
{
|
{
|
||||||
++MobIter;
|
++MobIter;
|
||||||
|
Loading…
Reference in New Issue
Block a user