From a13d009a30988037707ff79aab81be4acd8b6a77 Mon Sep 17 00:00:00 2001 From: Tycho Date: Sun, 26 Jan 2014 07:06:25 -0800 Subject: Refactored GetPlacementBlockTypeMeta --- src/Items/ItemDoor.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/Items/ItemDoor.h') diff --git a/src/Items/ItemDoor.h b/src/Items/ItemDoor.h index 72ea0beed..d5c1d887a 100644 --- a/src/Items/ItemDoor.h +++ b/src/Items/ItemDoor.h @@ -31,12 +31,14 @@ public: ) override { a_BlockType = (m_ItemType == E_ITEM_WOODEN_DOOR) ? E_BLOCK_WOODEN_DOOR : E_BLOCK_IRON_DOOR; - return BlockHandler(a_BlockType)->GetPlacementBlockTypeMeta( - a_World, a_Player, + cChunkInterface ChunkInterface(a_World->GetChunkMap()); + bool Meta = BlockHandler(a_BlockType)->GetPlacementBlockTypeMeta( + &ChunkInterface, a_Player, a_BlockX, a_BlockY, a_BlockZ, a_BlockFace, a_CursorX, a_CursorY, a_CursorZ, a_BlockType, a_BlockMeta ); + return Meta; } } ; -- cgit v1.2.3 From c6304b2b4faf31c2e4a91a07bcac298467898dba Mon Sep 17 00:00:00 2001 From: Tycho Date: Sat, 1 Feb 2014 05:06:32 -0800 Subject: Changed pointers to references --- src/Items/ItemDoor.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Items/ItemDoor.h') diff --git a/src/Items/ItemDoor.h b/src/Items/ItemDoor.h index d5c1d887a..531a0c6e4 100644 --- a/src/Items/ItemDoor.h +++ b/src/Items/ItemDoor.h @@ -33,7 +33,7 @@ public: a_BlockType = (m_ItemType == E_ITEM_WOODEN_DOOR) ? E_BLOCK_WOODEN_DOOR : E_BLOCK_IRON_DOOR; cChunkInterface ChunkInterface(a_World->GetChunkMap()); bool Meta = BlockHandler(a_BlockType)->GetPlacementBlockTypeMeta( - &ChunkInterface, a_Player, + ChunkInterface, a_Player, a_BlockX, a_BlockY, a_BlockZ, a_BlockFace, a_CursorX, a_CursorY, a_CursorZ, a_BlockType, a_BlockMeta -- cgit v1.2.3