From 1733ebf4cdb617b3db3ecdbdf5405a5359043521 Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Wed, 29 Aug 2012 20:40:08 +0000 Subject: Added a check if torch is placed on the bottom face, temporarily fix the assert. Server ignores the placement, but doesn't send correct block to the client. Also, the server should try placing the torch on a side, if available. git-svn-id: http://mc-server.googlecode.com/svn/trunk@801 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/blocks/BlockTorch.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/blocks/BlockTorch.h b/source/blocks/BlockTorch.h index 8f9775d20..f25680584 100644 --- a/source/blocks/BlockTorch.h +++ b/source/blocks/BlockTorch.h @@ -19,6 +19,10 @@ public: virtual void PlaceBlock(cWorld * a_World, cPlayer * a_Player, NIBBLETYPE a_BlockMeta, int a_X, int a_Y, int a_Z, char a_Dir) override { + if (a_Dir == BLOCK_FACE_BOTTOM) + { + return; + } a_World->SetBlock(a_X, a_Y, a_Z, m_BlockID, cTorch::DirectionToMetaData(a_Dir)); OnPlacedByPlayer(a_World, a_Player, a_X, a_Y, a_Z, a_Dir); } -- cgit v1.2.3