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
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)

View File

@ -2022,10 +2022,6 @@ void Server::ProcessData(u8 *data, u32 datasize, u16 peer_id)
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
*/
@ -4161,7 +4157,7 @@ v3f findSpawnPos(ServerMap &map)
-range + (myrand()%(range*2)));
//v2s16 sectorpos = getNodeSectorPos(nodepos2d);
// Get ground height at point (fallbacks to heightmap function)
s16 groundheight = map.findGroundLevel(nodepos2d);
s16 groundheight = map.findGroundLevel(nodepos2d) + 1;
// Don't go underwater
if(groundheight < WATER_LEVEL)
{