From 0d0323608df044aebfc6d0f3ac2ca5e07512facc Mon Sep 17 00:00:00 2001 From: peterbell10 Date: Mon, 31 Jul 2017 21:17:52 +0100 Subject: cBlockHandler: take player by ref --- src/Blocks/BlockHandler.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/Blocks/BlockHandler.cpp') diff --git a/src/Blocks/BlockHandler.cpp b/src/Blocks/BlockHandler.cpp index 305676984..1eae70c42 100644 --- a/src/Blocks/BlockHandler.cpp +++ b/src/Blocks/BlockHandler.cpp @@ -366,7 +366,7 @@ cBlockHandler::cBlockHandler(BLOCKTYPE a_BlockType) bool cBlockHandler::GetPlacementBlockTypeMeta( - cChunkInterface & a_ChunkInterface, cPlayer * a_Player, + cChunkInterface & a_ChunkInterface, cPlayer & a_Player, int a_BlockX, int a_BlockY, int a_BlockZ, eBlockFace a_BlockFace, int a_CursorX, int a_CursorY, int a_CursorZ, BLOCKTYPE & a_BlockType, NIBBLETYPE & a_BlockMeta @@ -374,7 +374,7 @@ bool cBlockHandler::GetPlacementBlockTypeMeta( { // By default, all blocks can be placed and the meta is copied over from the item's damage value: a_BlockType = m_BlockType; - a_BlockMeta = static_cast(a_Player->GetEquippedItem().m_ItemDamage & 0x0f); + a_BlockMeta = static_cast(a_Player.GetEquippedItem().m_ItemDamage & 0x0f); return true; } @@ -390,7 +390,7 @@ void cBlockHandler::OnUpdate(cChunkInterface & cChunkInterface, cWorldInterface -void cBlockHandler::OnPlacedByPlayer(cChunkInterface & a_ChunkInterface, cWorldInterface & a_WorldInterface, cPlayer * a_Player, const sSetBlock & a_BlockChange) +void cBlockHandler::OnPlacedByPlayer(cChunkInterface & a_ChunkInterface, cWorldInterface & a_WorldInterface, cPlayer & a_Player, const sSetBlock & a_BlockChange) { OnPlaced(a_ChunkInterface, a_WorldInterface, a_BlockChange.GetX(), a_BlockChange.GetY(), a_BlockChange.GetZ(), a_BlockChange.m_BlockType, a_BlockChange.m_BlockMeta); } @@ -399,7 +399,7 @@ void cBlockHandler::OnPlacedByPlayer(cChunkInterface & a_ChunkInterface, cWorldI -void cBlockHandler::OnDestroyedByPlayer(cChunkInterface & a_ChunkInterface, cWorldInterface & a_WorldInterface, cPlayer * a_Player, int a_BlockX, int a_BlockY, int a_BlockZ) +void cBlockHandler::OnDestroyedByPlayer(cChunkInterface & a_ChunkInterface, cWorldInterface & a_WorldInterface, cPlayer & a_Player, int a_BlockX, int a_BlockY, int a_BlockZ) { } -- cgit v1.2.3