aboutsummaryrefslogtreecommitdiff
path: root/src/server.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/server.cpp')
-rw-r--r--src/server.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/server.cpp b/src/server.cpp
index 6b9e656e9..13b59e7f5 100644
--- a/src/server.cpp
+++ b/src/server.cpp
@@ -2285,8 +2285,9 @@ void Server::ProcessData(u8 *data, u32 datasize, u16 peer_id)
}
/*infostream<<"Server::ProcessData(): Moved player "<<peer_id<<" to "
- <<"("<<position.X<<","<<position.Y<<","<<position.Z<<")"
- <<" pitch="<<pitch<<" yaw="<<yaw<<std::endl;*/
+ <<"("<<position.X<<","<<position.Y<<","<<position.Z<<")"
+ <<" pitch="<<pitch<<" yaw="<<yaw<<std::endl;*/
+
}
else if(command == TOSERVER_GOTBLOCKS)
{
@@ -5318,10 +5319,10 @@ v3f findSpawnPos(ServerMap &map)
-range + (myrand() % (range * 2)));
// Get ground height at point
- s16 groundheight = map.findGroundLevel(nodepos2d);
+ s16 groundheight = map.findGroundLevel(nodepos2d, g_settings->getBool("cache_block_before_spawn"));
if (groundheight <= water_level) // Don't go underwater
continue;
- if (groundheight > water_level + 6) // Don't go to high places
+ if (groundheight > water_level + g_settings->getS16("max_spawn_height")) // Don't go to high places
continue;
nodepos = v3s16(nodepos2d.X, groundheight, nodepos2d.Y);