Quick fix to avoid spawning underground bug
parent
38581e93be
commit
843010e1ab
|
@ -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)
|
||||||
|
|
|
@ -4156,7 +4156,7 @@ v3f findSpawnPos(ServerMap &map)
|
||||||
// Get sector (NOTE: Don't get because it's slow)
|
// Get sector (NOTE: Don't get because it's slow)
|
||||||
//m_env.getMap().emergeSector(sectorpos);
|
//m_env.getMap().emergeSector(sectorpos);
|
||||||
// Get ground height at point (fallbacks to heightmap function)
|
// Get ground height at point (fallbacks to heightmap function)
|
||||||
groundheight = map.findGroundLevel(nodepos);
|
groundheight = map.findGroundLevel(nodepos) + 1;
|
||||||
// Don't go underwater
|
// Don't go underwater
|
||||||
if(groundheight < WATER_LEVEL)
|
if(groundheight < WATER_LEVEL)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue