From 22d101034ffe810297455fb4caa27baf138a6342 Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Thu, 23 Jan 2014 22:24:20 +0100 Subject: Fixed flint&steel failure on the Y world edges. --- src/Items/ItemLighter.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/Items/ItemLighter.h b/src/Items/ItemLighter.h index 4281a2d0c..8f3389d95 100644 --- a/src/Items/ItemLighter.h +++ b/src/Items/ItemLighter.h @@ -42,6 +42,10 @@ public: { // Light a fire next to/on top of the block if air: AddFaceDirection(a_BlockX, a_BlockY, a_BlockZ, a_BlockFace); + if ((a_BlockY < 0) || (a_BlockY >= cChunkDef::Height)) + { + 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); -- cgit v1.2.3