diff options
Diffstat (limited to 'src/server.cpp')
-rw-r--r-- | src/server.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/server.cpp b/src/server.cpp index 80aa47671..28faaf440 100644 --- a/src/server.cpp +++ b/src/server.cpp @@ -606,6 +606,15 @@ void RemoteClient::GetNextBlocks(Server *server, float dtime, { block_is_invalid = true; } + + v2s16 p2d(p.X, p.Z); + ServerMap *map = (ServerMap*)(&server->m_env.getMap()); + v2s16 chunkpos = map->sector_to_chunk(p2d); + MapChunk *chunk = map->getChunk(chunkpos); + if(chunk == NULL) + block_is_invalid = true; + else if(chunk->getIsVolatile() == true) + block_is_invalid = true; } /* @@ -3258,7 +3267,8 @@ Player *Server::emergePlayer(const char *name, const char *password, player->setPosition(intToFloat(v3s16( nodepos.X, - groundheight + 1, + //groundheight + 1, + groundheight + 15, nodepos.Y ))); |