From 3d6e71a7d0d100e4d59464adcf8f0a09e6a20ad8 Mon Sep 17 00:00:00 2001 From: Perttu Ahola Date: Tue, 1 Feb 2011 20:28:21 +0200 Subject: end-of-day. --- src/server.cpp | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) (limited to 'src/server.cpp') diff --git a/src/server.cpp b/src/server.cpp index 669266cf2..d71a6c053 100644 --- a/src/server.cpp +++ b/src/server.cpp @@ -568,6 +568,11 @@ void RemoteClient::GetNextBlocks(Server *server, float dtime, continue; } +#if 0 + /* + NOTE: We can't know the ground level this way with the + new generator. + */ if(haxmode) { /* @@ -586,6 +591,7 @@ void RemoteClient::GetNextBlocks(Server *server, float dtime, continue; } } +#endif /* Check if map has this block @@ -2093,7 +2099,18 @@ void Server::ProcessData(u8 *data, u32 datasize, u16 peer_id) // Don't add a node if this is not a free space MapNode n2 = m_env.getMap().getNode(p_over); if(content_buildable_to(n2.d) == false) + { + // Client probably has wrong data. + // Set block not sent, so that client will get + // a valid one. + dstream<<"Client "<SetBlockNotSent(blockpos); return; + } } catch(InvalidPositionException &e) { @@ -3189,7 +3206,7 @@ Player *Server::emergePlayer(const char *name, const char *password, */ player->setPosition(intToFloat(v3s16( 0, - 50, + 64, 0 ))); @@ -3227,7 +3244,7 @@ Player *Server::emergePlayer(const char *name, const char *password, #if 1 player->setPosition(intToFloat(v3s16( 0, - 50, + 64, 0 ))); #endif -- cgit v1.2.3