1
0
Fork 0

Fixed right-click with bonemeal.

The client would send invalid right-click events with Y set to 0x7ff, which would crash the server. Only process bonemeal for valid clicks (valid blockface).
This commit is contained in:
Mattes D 2015-06-23 15:23:11 +02:00
parent 532c80b6db
commit 55a5f11b1b
1 changed files with 1 additions and 1 deletions

View File

@ -27,7 +27,7 @@ public:
) override
{
// Handle growing the plants:
if (a_Item.m_ItemDamage == E_META_DYE_WHITE)
if ((a_Item.m_ItemDamage == E_META_DYE_WHITE) && (a_BlockFace != BLOCK_FACE_NONE))
{
if (a_World->GrowRipePlant(a_BlockX, a_BlockY, a_BlockZ, true))
{