diff options
author | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2013-08-25 14:41:02 +0200 |
---|---|---|
committer | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2013-08-25 14:41:02 +0200 |
commit | 55e3fc53f65fe3073a9453a9aa2cb86132a28bc3 (patch) | |
tree | 06fa2204dfae6f4e6910c3f4f088fa387b1a5d02 /source/Blocks/BlockDoor.cpp | |
parent | Fixed public thing in ClientHandle (diff) | |
download | cuberite-55e3fc53f65fe3073a9453a9aa2cb86132a28bc3.tar cuberite-55e3fc53f65fe3073a9453a9aa2cb86132a28bc3.tar.gz cuberite-55e3fc53f65fe3073a9453a9aa2cb86132a28bc3.tar.bz2 cuberite-55e3fc53f65fe3073a9453a9aa2cb86132a28bc3.tar.lz cuberite-55e3fc53f65fe3073a9453a9aa2cb86132a28bc3.tar.xz cuberite-55e3fc53f65fe3073a9453a9aa2cb86132a28bc3.tar.zst cuberite-55e3fc53f65fe3073a9453a9aa2cb86132a28bc3.zip |
Diffstat (limited to 'source/Blocks/BlockDoor.cpp')
-rw-r--r-- | source/Blocks/BlockDoor.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source/Blocks/BlockDoor.cpp b/source/Blocks/BlockDoor.cpp index 267486c47..02cbd28e2 100644 --- a/source/Blocks/BlockDoor.cpp +++ b/source/Blocks/BlockDoor.cpp @@ -47,7 +47,10 @@ void cBlockDoorHandler::OnDestroyed(cWorld * a_World, int a_BlockX, int a_BlockY void cBlockDoorHandler::OnUse(cWorld * a_World, cPlayer * a_Player, int a_BlockX, int a_BlockY, int a_BlockZ, char a_BlockFace, int a_CursorX, int a_CursorY, int a_CursorZ) { - cDoors::ChangeDoor(a_World, a_BlockX, a_BlockY, a_BlockZ); + if (a_World->GetBlock(a_BlockX, a_BlockY, a_BlockZ) == E_BLOCK_WOODEN_DOOR) + { + cDoors::ChangeDoor(a_World, a_BlockX, a_BlockY, a_BlockZ); + } } |