say no to underground spawn

master
Ilya Zhuravlev 2011-11-15 16:27:35 +04:00
parent 09f2408158
commit 222f4969f0
2 changed files with 5 additions and 9 deletions

View File

@ -783,14 +783,14 @@ void the_game(
// Update client and server // Update client and server
client.step(0.1); client.step(0.0001);
if(server != NULL) if(server != NULL)
server->step(0.1); server->step(0.0001);
// Delay a bit // Delay a bit
sleep_ms(100); sleep_ms(1);
time_counter += 0.1; time_counter += 0.0001;
} }
} }
catch(con::PeerNotFoundException &e) catch(con::PeerNotFoundException &e)

View File

@ -2022,10 +2022,6 @@ void Server::ProcessData(u8 *data, u32 datasize, u16 peer_id)
return; return;
} }
// this magic fixes (very dirty-fixes) bug when you are 3 nodes (cubes) down after logout-login
v3f position = player->getPosition();
position.Y += 3;
player->setPosition(position);
/* /*
Answer with a TOCLIENT_INIT Answer with a TOCLIENT_INIT
*/ */
@ -4161,7 +4157,7 @@ v3f findSpawnPos(ServerMap &map)
-range + (myrand()%(range*2))); -range + (myrand()%(range*2)));
//v2s16 sectorpos = getNodeSectorPos(nodepos2d); //v2s16 sectorpos = getNodeSectorPos(nodepos2d);
// Get ground height at point (fallbacks to heightmap function) // Get ground height at point (fallbacks to heightmap function)
s16 groundheight = map.findGroundLevel(nodepos2d); s16 groundheight = map.findGroundLevel(nodepos2d) + 1;
// Don't go underwater // Don't go underwater
if(groundheight < WATER_LEVEL) if(groundheight < WATER_LEVEL)
{ {