1
0

cBlockHandler: take player by ref

This commit is contained in:
peterbell10
2017-07-31 21:17:52 +01:00
committed by Lukas Pioch
parent 8eb5672920
commit 0d0323608d
52 changed files with 159 additions and 159 deletions

View File

@@ -362,7 +362,7 @@ bool cItemHandler::OnPlayerPlace(
// Check if the block ignores build collision (water, grass etc.):
if (BlockHandler(ClickedBlock)->DoesIgnoreBuildCollision(ChunkInterface, { a_BlockX, a_BlockY, a_BlockZ }, a_Player, ClickedBlockMeta))
{
BlockHandler(ClickedBlock)->OnDestroyedByPlayer(ChunkInterface, a_World, &a_Player, a_BlockX, a_BlockY, a_BlockZ);
BlockHandler(ClickedBlock)->OnDestroyedByPlayer(ChunkInterface, a_World, a_Player, a_BlockX, a_BlockY, a_BlockZ);
}
else
{
@@ -815,7 +815,7 @@ bool cItemHandler::GetPlacementBlockTypeMeta(
cBlockHandler * BlockH = BlockHandler(static_cast<BLOCKTYPE>(m_ItemType));
cChunkInterface ChunkInterface(a_World->GetChunkMap());
return BlockH->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