Now spawn points will not be in deep oceans or rivers etc.
parent
6785bb7c16
commit
d85ea4f654
|
@ -608,7 +608,7 @@ void cWorld::GenerateRandomSpawn(void)
|
|||
{
|
||||
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
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue