1
0

Now spawn points will not be in deep oceans or rivers etc.

This commit is contained in:
STRWarrior 2013-12-08 17:05:51 +01:00
parent 6785bb7c16
commit d85ea4f654

View File

@ -608,7 +608,7 @@ void cWorld::GenerateRandomSpawn(void)
{ {
LOGD("Generating random spawnpoint..."); LOGD("Generating random spawnpoint...");
while (GetBiomeAt((int)m_SpawnX, (int)m_SpawnZ) == biOcean) // Anything but ocean is fine while (IsBlockWater(GetBlock((int)m_SpawnX, GetHeight((int)m_SpawnX, (int)m_SpawnZ), (int)m_SpawnZ)))
{ {
if ((GetTickRandomNumber(4) % 2) == 0) // Randomise whether to increment X or Z coords if ((GetTickRandomNumber(4) % 2) == 0) // Randomise whether to increment X or Z coords
{ {