diff options
author | Perttu Ahola <celeron55@gmail.com> | 2011-07-30 19:05:25 +0300 |
---|---|---|
committer | Perttu Ahola <celeron55@gmail.com> | 2011-07-30 19:05:25 +0300 |
commit | 4b0c3e435715479ce13df7319298884b1589be22 (patch) | |
tree | b5ba16acd30aba0e22e37f469fb460ac56d82dca /src | |
parent | cae422076bc921ab5bc4c8168651534418767c12 (diff) | |
download | minetest-4b0c3e435715479ce13df7319298884b1589be22.tar.gz minetest-4b0c3e435715479ce13df7319298884b1589be22.tar.bz2 minetest-4b0c3e435715479ce13df7319298884b1589be22.zip |
Made picking items up in creative mode delete them (because they usually are in the inventory already anyway)
Diffstat (limited to 'src')
-rw-r--r-- | src/server.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/server.cpp b/src/server.cpp index ab60be5cc..b0c087d09 100644 --- a/src/server.cpp +++ b/src/server.cpp @@ -2384,10 +2384,10 @@ void Server::ProcessData(u8 *data, u32 datasize, u16 peer_id) if(item) { - if(g_settings.getBool("creative_mode") == false) + InventoryList *ilist = player->inventory.getList("main"); + if(ilist != NULL) { - InventoryList *ilist = player->inventory.getList("main"); - if(ilist != NULL) + if(g_settings.getBool("creative_mode") == false) { // Skip if inventory has no free space if(ilist->getUsedSlots() == ilist->getSize()) @@ -2400,10 +2400,10 @@ void Server::ProcessData(u8 *data, u32 datasize, u16 peer_id) ilist->addItem(item); UpdateCrafting(player->peer_id); SendInventory(player->peer_id); - - // Remove object from environment - obj->m_removed = true; } + + // Remove object from environment + obj->m_removed = true; } } else |