X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Fserver.cpp;h=b3ce9c13aeeef720b876219bf11227d0516b75dd;hb=01c2b003e1efb839ad246eb939af7fa8336b9ad5;hp=abdbd975d0a5683f29baf2d6adce9e5ee408685a;hpb=bc66bb2d409f13554bdcec7386766af82a343cad;p=dragonfireclient.git diff --git a/src/server.cpp b/src/server.cpp index abdbd975d..b3ce9c13a 100644 --- a/src/server.cpp +++ b/src/server.cpp @@ -233,11 +233,11 @@ void * EmergeThread::Thread() if(lighting_invalidated_blocks.size() > 0) { - dstream<<"lighting "<isFullyGenerated() == false) + /*if(block->isFullyGenerated() == false) { block_is_invalid = true; - } + }*/ + + v2s16 p2d(p.X, p.Z); + ServerMap *map = (ServerMap*)(&server->m_env.getMap()); + v2s16 chunkpos = map->sector_to_chunk(p2d); + if(map->chunkNonVolatile(chunkpos) == false) + block_is_invalid = true; } /* @@ -1711,7 +1717,8 @@ void Server::ProcessData(u8 *data, u32 datasize, u16 peer_id) writeU16(&reply[0], TOCLIENT_INIT); writeU8(&reply[2], deployed); writeV3S16(&reply[2+1], floatToInt(player->getPosition()+v3f(0,BS/2,0), BS)); - writeU64(&reply[2+1+6], m_env.getServerMap().getSeed()); + //writeU64(&reply[2+1+6], m_env.getServerMap().getSeed()); + // Send as reliable m_con.Send(peer_id, 0, reply, true); @@ -3320,6 +3327,36 @@ void setCreativeInventory(Player *player) /* Give materials */ + + // CONTENT_IGNORE-terminated list + u8 material_items[] = { + CONTENT_TORCH, + CONTENT_MUD, + CONTENT_STONE, + CONTENT_SAND, + CONTENT_TREE, + CONTENT_LEAVES, + CONTENT_MESE, + CONTENT_WATERSOURCE, + CONTENT_CLOUD, + CONTENT_FURNACE, + CONTENT_SIGN_WALL, + CONTENT_IGNORE + }; + + u8 *mip = material_items; + for(u16 i=0; iinventory.addItem("main", item); + + mip++; + } + +#if 0 assert(USEFUL_CONTENT_COUNT <= PLAYER_INVENTORY_SIZE); // add torch first @@ -3337,6 +3374,8 @@ void setCreativeInventory(Player *player) InventoryItem *item = new MaterialItem(i, 1); player->inventory.addItem("main", item); } +#endif + // Sign { InventoryItem *item = new MapBlockObjectItem("Sign Example text"); @@ -3476,7 +3515,7 @@ Player *Server::emergePlayer(const char *name, const char *password, player->setPosition(intToFloat(v3s16( nodepos.X, - groundheight + 1, + groundheight + 5, // Accomodate mud nodepos.Y ), BS)); #endif