1
0
Fork 0

The bottom layer cannot hold a valid spawn point

Fixes #2510
This commit is contained in:
worktycho 2015-09-29 18:10:04 +01:00 committed by tycho
parent 8688bb50be
commit dacab890cc
1 changed files with 6 additions and 0 deletions

View File

@ -624,6 +624,12 @@ void cWorld::GenerateRandomSpawn(void)
bool cWorld::CheckPlayerSpawnPoint(int a_PosX, int a_PosY, int a_PosZ)
{
// The bottom layer cannot hold a valid spawn point
if (a_PosY <= 0)
{
return false;
}
// Check that spawnblock and surrounding blocks are neither solid nor water / lava
static const struct
{