From d8e16f8c1fa771f77ef7505b45b9114b1f75aa61 Mon Sep 17 00:00:00 2001 From: Howaner Date: Fri, 30 May 2014 22:22:42 +0200 Subject: Better SetOpen() and IsOpen() function from the doors. --- src/Blocks/BlockDoor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Blocks/BlockDoor.cpp') diff --git a/src/Blocks/BlockDoor.cpp b/src/Blocks/BlockDoor.cpp index 479c68153..fb2d6f2dc 100644 --- a/src/Blocks/BlockDoor.cpp +++ b/src/Blocks/BlockDoor.cpp @@ -62,7 +62,7 @@ void cBlockDoorHandler::OnCancelRightClick(cChunkInterface & a_ChunkInterface, c a_WorldInterface.SendBlockTo(a_BlockX, a_BlockY, a_BlockZ, a_Player); NIBBLETYPE Meta = a_ChunkInterface.GetBlockMeta(a_BlockX, a_BlockY, a_BlockZ); - if (Meta & 8) + if (Meta & 0x8) { // Current block is top of the door a_WorldInterface.SendBlockTo(a_BlockX, a_BlockY - 1, a_BlockZ, a_Player); -- cgit v1.2.3 From 0d08b9a62e1516e0f725791e42c3123cecf7028f Mon Sep 17 00:00:00 2001 From: Howaner Date: Tue, 17 Jun 2014 17:00:51 +0200 Subject: Add door sound --- src/Blocks/BlockDoor.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/Blocks/BlockDoor.cpp') diff --git a/src/Blocks/BlockDoor.cpp b/src/Blocks/BlockDoor.cpp index fb2d6f2dc..2d7c849c6 100644 --- a/src/Blocks/BlockDoor.cpp +++ b/src/Blocks/BlockDoor.cpp @@ -48,6 +48,7 @@ void cBlockDoorHandler::OnUse(cChunkInterface & a_ChunkInterface, cWorldInterfac if (a_ChunkInterface.GetBlock(a_BlockX, a_BlockY, a_BlockZ) == E_BLOCK_WOODEN_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()); } } -- cgit v1.2.3 From 8de8768f02b5d9b066aa935d47c851552b6c7341 Mon Sep 17 00:00:00 2001 From: Howaner Date: Tue, 17 Jun 2014 17:01:23 +0200 Subject: Add UNUSED() Tags --- src/Blocks/BlockDoor.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/Blocks/BlockDoor.cpp') diff --git a/src/Blocks/BlockDoor.cpp b/src/Blocks/BlockDoor.cpp index 2d7c849c6..934a01994 100644 --- a/src/Blocks/BlockDoor.cpp +++ b/src/Blocks/BlockDoor.cpp @@ -45,6 +45,12 @@ void cBlockDoorHandler::OnDestroyed(cChunkInterface & a_ChunkInterface, cWorldIn void cBlockDoorHandler::OnUse(cChunkInterface & a_ChunkInterface, cWorldInterface & a_WorldInterface, cPlayer * a_Player, int a_BlockX, int a_BlockY, int a_BlockZ, eBlockFace a_BlockFace, int a_CursorX, int a_CursorY, int a_CursorZ) { + UNUSED(a_WorldInterface); + UNUSED(a_BlockFace); + UNUSED(a_CursorX); + UNUSED(a_CursorY); + UNUSED(a_CursorZ); + if (a_ChunkInterface.GetBlock(a_BlockX, a_BlockY, a_BlockZ) == E_BLOCK_WOODEN_DOOR) { ChangeDoor(a_ChunkInterface, a_BlockX, a_BlockY, a_BlockZ); -- cgit v1.2.3 From 5e198c673009cf8ca9d92cf59848999bc96bbc37 Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Thu, 17 Jul 2014 22:50:58 +0200 Subject: Basic style fixes. --- src/Blocks/BlockDoor.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Blocks/BlockDoor.cpp') diff --git a/src/Blocks/BlockDoor.cpp b/src/Blocks/BlockDoor.cpp index 934a01994..e80473cb5 100644 --- a/src/Blocks/BlockDoor.cpp +++ b/src/Blocks/BlockDoor.cpp @@ -152,7 +152,7 @@ NIBBLETYPE cBlockDoorHandler::MetaMirrorXY(NIBBLETYPE a_Meta) // Return a_Meta if panel is a top panel (0x08 bit is set to 1) // Note: Currently, you can not properly mirror the hinges on a double door. The orientation of the door is stored - // in only the bottom tile while the hinge position is in the top tile. This function only operates on one tile at a time, + // in only the bottom tile while the hinge position is in the top tile. This function only operates on one tile at a time, // so the function can only see either the hinge position or orientation, but not both, at any given time. The class itself // needs extra datamembers. if (a_Meta & 0x08) return a_Meta; @@ -179,7 +179,7 @@ NIBBLETYPE cBlockDoorHandler::MetaMirrorYZ(NIBBLETYPE a_Meta) // Return a_Meta if panel is a top panel (0x08 bit is set to 1) // Note: Currently, you can not properly mirror the hinges on a double door. The orientation of the door is stored - // in only the bottom tile while the hinge position is in the top tile. This function only operates on one tile at a time, + // in only the bottom tile while the hinge position is in the top tile. This function only operates on one tile at a time, // so the function can only see either the hinge position or orientation, but not both, at any given time.The class itself // needs extra datamembers. -- cgit v1.2.3