summaryrefslogtreecommitdiffstats
path: root/source/Blocks/BlockDoor.cpp
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2013-08-25 17:06:51 +0200
committermadmaxoft <github@xoft.cz>2013-08-25 17:06:51 +0200
commit83811b69292bff0ef4b24087a4a4d3e523b0076a (patch)
tree50bf797896f5df82af4cfcd642759d005c598044 /source/Blocks/BlockDoor.cpp
parentProjectile entities get saved into MCA files (diff)
parentReduced LeakFinder's stack buffers to half. (diff)
downloadcuberite-83811b69292bff0ef4b24087a4a4d3e523b0076a.tar
cuberite-83811b69292bff0ef4b24087a4a4d3e523b0076a.tar.gz
cuberite-83811b69292bff0ef4b24087a4a4d3e523b0076a.tar.bz2
cuberite-83811b69292bff0ef4b24087a4a4d3e523b0076a.tar.lz
cuberite-83811b69292bff0ef4b24087a4a4d3e523b0076a.tar.xz
cuberite-83811b69292bff0ef4b24087a4a4d3e523b0076a.tar.zst
cuberite-83811b69292bff0ef4b24087a4a4d3e523b0076a.zip
Diffstat (limited to 'source/Blocks/BlockDoor.cpp')
-rw-r--r--source/Blocks/BlockDoor.cpp5
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);
+ }
}