summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2015-08-02 00:38:20 +0200
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2015-08-02 00:38:20 +0200
commit6fdc4a1ea3fd558244bdb39cd97971ad33b2cc5f (patch)
tree932063290adc1347bd59c4548af8cae0a988f6cd /src
parentMerge pull request #2412 from cuberite/UnifyComments (diff)
parentFixed Iron Door (diff)
downloadcuberite-6fdc4a1ea3fd558244bdb39cd97971ad33b2cc5f.tar
cuberite-6fdc4a1ea3fd558244bdb39cd97971ad33b2cc5f.tar.gz
cuberite-6fdc4a1ea3fd558244bdb39cd97971ad33b2cc5f.tar.bz2
cuberite-6fdc4a1ea3fd558244bdb39cd97971ad33b2cc5f.tar.lz
cuberite-6fdc4a1ea3fd558244bdb39cd97971ad33b2cc5f.tar.xz
cuberite-6fdc4a1ea3fd558244bdb39cd97971ad33b2cc5f.tar.zst
cuberite-6fdc4a1ea3fd558244bdb39cd97971ad33b2cc5f.zip
Diffstat (limited to 'src')
-rw-r--r--src/Blocks/BlockDoor.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/Blocks/BlockDoor.cpp b/src/Blocks/BlockDoor.cpp
index 3997441ab..af50834ef 100644
--- a/src/Blocks/BlockDoor.cpp
+++ b/src/Blocks/BlockDoor.cpp
@@ -61,13 +61,18 @@ void cBlockDoorHandler::OnUse(cChunkInterface & a_ChunkInterface, cWorldInterfac
case E_BLOCK_DARK_OAK_DOOR:
case E_BLOCK_JUNGLE_DOOR:
case E_BLOCK_SPRUCE_DOOR:
- case E_BLOCK_IRON_DOOR:
case E_BLOCK_OAK_DOOR:
{
ChangeDoor(a_ChunkInterface, a_BlockX, a_BlockY, a_BlockZ);
a_Player->GetWorld()->BroadcastSoundParticleEffect(1003, a_BlockX, a_BlockY, a_BlockZ, 0, a_Player->GetClientHandle());
break;
}
+ // Prevent iron door from opening on player click
+ case E_BLOCK_IRON_DOOR:
+ {
+ OnCancelRightClick(a_ChunkInterface, a_WorldInterface, a_Player, a_BlockX, a_BlockY, a_BlockZ, a_BlockFace);
+ break;
+ }
}
}