From 52d8da6ebe30be046566ba6a34099ba5ebb843a1 Mon Sep 17 00:00:00 2001 From: Tiger Wang Date: Fri, 23 Aug 2013 18:13:54 +0100 Subject: Fixed lighters replacing blocks --- source/Items/ItemLighter.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'source/Items') diff --git a/source/Items/ItemLighter.h b/source/Items/ItemLighter.h index 39534c7b1..4281a2d0c 100644 --- a/source/Items/ItemLighter.h +++ b/source/Items/ItemLighter.h @@ -40,10 +40,13 @@ public: } default: { - // Light a fire next to the block: + // Light a fire next to/on top of the block if air: AddFaceDirection(a_BlockX, a_BlockY, a_BlockZ, a_BlockFace); - a_World->SetBlock(a_BlockX, a_BlockY, a_BlockZ, E_BLOCK_FIRE, 0); - break; + if (a_World->GetBlock(a_BlockX, a_BlockY, a_BlockZ) == E_BLOCK_AIR) + { + a_World->SetBlock(a_BlockX, a_BlockY, a_BlockZ, E_BLOCK_FIRE, 0); + break; + } } } -- cgit v1.2.3