diff options
author | worktycho <work.tycho@gmail.com> | 2015-10-01 16:23:49 +0200 |
---|---|---|
committer | worktycho <work.tycho@gmail.com> | 2015-10-01 16:23:49 +0200 |
commit | 9889664ffac47989b5f5b0c1a0fd27eba36f54ab (patch) | |
tree | 4b2db89babcaf4068aa66782f57b46499ed8bfa1 | |
parent | Merge pull request #2518 from cuberite/UpdateSQLiteCpp (diff) | |
parent | The bottom layer cannot hold a valid spawn point (diff) | |
download | cuberite-9889664ffac47989b5f5b0c1a0fd27eba36f54ab.tar cuberite-9889664ffac47989b5f5b0c1a0fd27eba36f54ab.tar.gz cuberite-9889664ffac47989b5f5b0c1a0fd27eba36f54ab.tar.bz2 cuberite-9889664ffac47989b5f5b0c1a0fd27eba36f54ab.tar.lz cuberite-9889664ffac47989b5f5b0c1a0fd27eba36f54ab.tar.xz cuberite-9889664ffac47989b5f5b0c1a0fd27eba36f54ab.tar.zst cuberite-9889664ffac47989b5f5b0c1a0fd27eba36f54ab.zip |
Diffstat (limited to '')
-rw-r--r-- | src/World.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/World.cpp b/src/World.cpp index 824ebf3fa..de0dc6ea5 100644 --- a/src/World.cpp +++ b/src/World.cpp @@ -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 { |