Skip to content
Snippets Groups Projects
Commit 4b0c3e43 authored by Perttu Ahola's avatar Perttu Ahola
Browse files

Made picking items up in creative mode delete them (because they usually are...

Made picking items up in creative mode delete them (because they usually are in the inventory already anyway)
parent cae42207
No related branches found
No related tags found
No related merge requests found
...@@ -2384,10 +2384,10 @@ void Server::ProcessData(u8 *data, u32 datasize, u16 peer_id) ...@@ -2384,10 +2384,10 @@ void Server::ProcessData(u8 *data, u32 datasize, u16 peer_id)
if(item) 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(g_settings.getBool("creative_mode") == false)
if(ilist != NULL)
{ {
// Skip if inventory has no free space // Skip if inventory has no free space
if(ilist->getUsedSlots() == ilist->getSize()) if(ilist->getUsedSlots() == ilist->getSize())
...@@ -2400,10 +2400,10 @@ void Server::ProcessData(u8 *data, u32 datasize, u16 peer_id) ...@@ -2400,10 +2400,10 @@ void Server::ProcessData(u8 *data, u32 datasize, u16 peer_id)
ilist->addItem(item); ilist->addItem(item);
UpdateCrafting(player->peer_id); UpdateCrafting(player->peer_id);
SendInventory(player->peer_id); SendInventory(player->peer_id);
// Remove object from environment
obj->m_removed = true;
} }
// Remove object from environment
obj->m_removed = true;
} }
} }
else else
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment