From 843010e1ab19ba0b0e4188e5a5996536e5034c49 Mon Sep 17 00:00:00 2001 From: ValkaTR Date: Sun, 13 Nov 2011 16:09:04 +0200 Subject: [PATCH] Quick fix to avoid spawning underground bug --- src/game.cpp | 8 ++++---- src/server.cpp | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/game.cpp b/src/game.cpp index d81223f..0f002cb 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -783,14 +783,14 @@ void the_game( // Update client and server - client.step(0.1); + client.step(0.0001); if(server != NULL) - server->step(0.1); + server->step(0.0001); // Delay a bit - sleep_ms(100); - time_counter += 0.1; + sleep_ms(1); + time_counter += 0.0001; } } catch(con::PeerNotFoundException &e) diff --git a/src/server.cpp b/src/server.cpp index 52e9dc8..7d22a44 100644 --- a/src/server.cpp +++ b/src/server.cpp @@ -4156,7 +4156,7 @@ v3f findSpawnPos(ServerMap &map) // Get sector (NOTE: Don't get because it's slow) //m_env.getMap().emergeSector(sectorpos); // Get ground height at point (fallbacks to heightmap function) - groundheight = map.findGroundLevel(nodepos); + groundheight = map.findGroundLevel(nodepos) + 1; // Don't go underwater if(groundheight < WATER_LEVEL) {