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
master
madmaxoft@gmail.com 2012-08-29 20:40:08 +00:00
parent 1651fcd980
commit 1733ebf4cd
1 changed files with 4 additions and 0 deletions

View File

@ -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);
}