From 0b9b7bc1a8d5cf6f92b802dc376a189ef066e62d Mon Sep 17 00:00:00 2001 From: Tiger Wang Date: Mon, 20 Apr 2020 20:46:04 +0100 Subject: Unify entity spawn packet sending --- src/Items/ItemItemFrame.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Items/ItemItemFrame.h') diff --git a/src/Items/ItemItemFrame.h b/src/Items/ItemItemFrame.h index bcc325701..2c191a003 100644 --- a/src/Items/ItemItemFrame.h +++ b/src/Items/ItemItemFrame.h @@ -41,7 +41,7 @@ public: } // Make sure block that will be occupied by the item frame is free now: - auto PlacePos = AddFaceDirection(a_ClickedBlockPos, a_ClickedBlockFace); + const auto PlacePos = AddFaceDirection(a_ClickedBlockPos, a_ClickedBlockFace); BLOCKTYPE Block = a_World->GetBlock(PlacePos); if (Block != E_BLOCK_AIR) { @@ -49,7 +49,7 @@ public: } // Place the item frame: - auto ItemFrame = cpp14::make_unique(a_ClickedBlockFace, a_ClickedBlockPos); + auto ItemFrame = cpp14::make_unique(a_ClickedBlockFace, PlacePos); auto ItemFramePtr = ItemFrame.get(); if (!ItemFramePtr->Initialize(std::move(ItemFrame), *a_World)) { -- cgit v1.2.3