From 521087fc078e23a897a21b6d5e9c7a370bc35bac Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Thu, 9 Aug 2012 08:43:26 +0000 Subject: Torch placement handling (contributed by l0udPL) git-svn-id: http://mc-server.googlecode.com/svn/trunk@721 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/blocks/BlockRedstoneTorch.h | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'source/blocks/BlockRedstoneTorch.h') diff --git a/source/blocks/BlockRedstoneTorch.h b/source/blocks/BlockRedstoneTorch.h index 0b8be74e1..c90e1362d 100644 --- a/source/blocks/BlockRedstoneTorch.h +++ b/source/blocks/BlockRedstoneTorch.h @@ -1,8 +1,13 @@ + #pragma once #include "BlockRedstone.h" +#include "BlockTorch.h" #include "../cTorch.h" + + + class cBlockRedstoneTorchHandler : public cBlockRedstoneHandler { public: @@ -11,10 +16,10 @@ public: { } + virtual bool CanBePlacedAt(cWorld *a_World, int a_X, int a_Y, int a_Z, char a_Dir) override { - AddDirection( a_X, a_Y, a_Z, a_Dir, true ); - return a_World->GetBlock( a_X, a_Y, a_Z ) != E_BLOCK_AIR; + return cBlockTorchHandler::TorchCanBePlacedAt(a_World, a_X, a_Y, a_Z, a_Dir); } @@ -24,10 +29,12 @@ public: return CanBePlacedAt(a_World, a_X, a_Y, a_Z, Dir); } - virtual int GetDropID() override + + virtual int GetDropID(void) override { return E_ITEM_REDSTONE_TORCH_ON; } + virtual bool CanBePlacedOnSide() override { -- cgit v1.2.3