summaryrefslogtreecommitdiffstats
path: root/source/Items
diff options
context:
space:
mode:
Diffstat (limited to 'source/Items')
-rw-r--r--source/Items/ItemSlab.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/source/Items/ItemSlab.h b/source/Items/ItemSlab.h
index 36779138b..174beae22 100644
--- a/source/Items/ItemSlab.h
+++ b/source/Items/ItemSlab.h
@@ -29,12 +29,20 @@ public:
&& (Block == a_Item->m_ItemType) // Same slab
&& ((Meta & 0x7) == (a_Item->m_ItemHealth & 0x7))) // Same Texture
{
- cItem Item(a_Item->m_ItemType, 1);
- if (a_Player->GetInventory().RemoveItem(Item))
+ if(a_Player->GetGameMode() == eGameMode_Creative)
{
- a_World->SetBlock(a_BlockX, a_BlockY, a_BlockZ, Block - 1, Meta); // Block - 1 simple hack to save one if statement
+ a_World->SetBlock(a_BlockX, a_BlockY, a_BlockZ, Block - 1, Meta); // Block - 1 simple hack to save one if statement
return true;
}
+ else
+ {
+ cItem Item(a_Item->m_ItemType, 1);
+ if (a_Player->GetInventory().RemoveItem(Item))
+ {
+ a_World->SetBlock(a_BlockX, a_BlockY, a_BlockZ, Block - 1, Meta); // Block - 1 simple hack to save one if statement
+ return true;
+ }
+ }
}
return false;
}