Send the old slab to the client when the interact cancelled.
This commit is contained in:
parent
27a818e173
commit
3d68466ab0
@ -112,6 +112,17 @@ public:
|
||||
}
|
||||
|
||||
|
||||
virtual void OnCancelRightClick(cChunkInterface & a_ChunkInterface, cWorldInterface & a_WorldInterface, cPlayer * a_Player, int a_BlockX, int a_BlockY, int a_BlockZ, eBlockFace a_BlockFace) override
|
||||
{
|
||||
if ((a_BlockFace == BLOCK_FACE_NONE) || (a_Player->GetEquippedItem().m_ItemType != (short)m_BlockType))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
a_Player->GetWorld()->SendBlockTo(a_BlockX, a_BlockY, a_BlockZ, a_Player);
|
||||
}
|
||||
|
||||
|
||||
/// Converts the single-slab blocktype to its equivalent double-slab blocktype
|
||||
static BLOCKTYPE GetDoubleSlabType(BLOCKTYPE a_SingleSlabBlockType)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user