From 7e288850b1c13712decb5938cef7e1648ca7fa9b Mon Sep 17 00:00:00 2001 From: Tiger Wang Date: Sat, 10 Aug 2013 21:32:50 +0100 Subject: Attempt at fixing torch placement Attempt at fixing #71 and placement of torches. --- source/Blocks/BlockTorch.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'source/Blocks/BlockTorch.h') diff --git a/source/Blocks/BlockTorch.h b/source/Blocks/BlockTorch.h index 00e0a585c..c94c4c436 100644 --- a/source/Blocks/BlockTorch.h +++ b/source/Blocks/BlockTorch.h @@ -1,4 +1,3 @@ - #pragma once #include "BlockHandler.h" @@ -103,7 +102,8 @@ public: virtual bool DoesAllowBlockOnTop(void) override { - return false; + return true; + //was false } @@ -114,6 +114,8 @@ public: case E_BLOCK_GLASS: case E_BLOCK_FENCE: case E_BLOCK_NETHER_BRICK_FENCE: + case E_BLOCK_PISTON: + case E_BLOCK_WORKBENCH: { return (a_Direction == 0x1); // allow only direction "standing on floor" } @@ -130,7 +132,7 @@ public: { // TODO: If placing a torch from below, check all 4 XZ neighbors, place it on that neighbor instead // How to propagate that change up? - // Simon: The easiest way is to calculate the position two times, shouldn´t cost much cpu power :) + // Simon: The easiest way is to calculate the position two times, shouldn�t cost much cpu power :) if (a_BlockFace == BLOCK_FACE_BOTTOM) { -- cgit v1.2.3