diff options
author | peterbell10 <peterbell10@live.co.uk> | 2017-07-31 22:17:52 +0200 |
---|---|---|
committer | Lukas Pioch <lukas@zgow.de> | 2017-08-01 08:21:20 +0200 |
commit | 0d0323608df044aebfc6d0f3ac2ca5e07512facc (patch) | |
tree | f2317e70c96b7ffc8f0dae99cd563163deb985ad /src/ClientHandle.cpp | |
parent | cWorld::SendBlockTo take player by ref (diff) | |
download | cuberite-0d0323608df044aebfc6d0f3ac2ca5e07512facc.tar cuberite-0d0323608df044aebfc6d0f3ac2ca5e07512facc.tar.gz cuberite-0d0323608df044aebfc6d0f3ac2ca5e07512facc.tar.bz2 cuberite-0d0323608df044aebfc6d0f3ac2ca5e07512facc.tar.lz cuberite-0d0323608df044aebfc6d0f3ac2ca5e07512facc.tar.xz cuberite-0d0323608df044aebfc6d0f3ac2ca5e07512facc.tar.zst cuberite-0d0323608df044aebfc6d0f3ac2ca5e07512facc.zip |
Diffstat (limited to '')
-rw-r--r-- | src/ClientHandle.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ClientHandle.cpp b/src/ClientHandle.cpp index 3f7a2c724..2bf397f76 100644 --- a/src/ClientHandle.cpp +++ b/src/ClientHandle.cpp @@ -1245,7 +1245,7 @@ void cClientHandle::HandleBlockDigStarted(int a_BlockX, int a_BlockY, int a_Bloc cWorld * World = m_Player->GetWorld(); cChunkInterface ChunkInterface(World->GetChunkMap()); cBlockHandler * Handler = cBlockInfo::GetHandler(a_OldBlock); - Handler->OnDigging(ChunkInterface, *World, m_Player, a_BlockX, a_BlockY, a_BlockZ); + Handler->OnDigging(ChunkInterface, *World, *m_Player, a_BlockX, a_BlockY, a_BlockZ); cItemHandler * ItemHandler = cItemHandler::GetItemHandler(m_Player->GetEquippedItem()); ItemHandler->OnDiggingBlock(World, m_Player, m_Player->GetEquippedItem(), a_BlockX, a_BlockY, a_BlockZ, a_BlockFace); @@ -1326,7 +1326,7 @@ void cClientHandle::HandleBlockDigFinished(int a_BlockX, int a_BlockY, int a_Blo ItemHandler->OnBlockDestroyed(World, m_Player, m_Player->GetEquippedItem(), a_BlockX, a_BlockY, a_BlockZ); // The ItemHandler is also responsible for spawning the pickups cChunkInterface ChunkInterface(World->GetChunkMap()); - BlockHandler(a_OldBlock)->OnDestroyedByPlayer(ChunkInterface, *World, m_Player, a_BlockX, a_BlockY, a_BlockZ); + BlockHandler(a_OldBlock)->OnDestroyedByPlayer(ChunkInterface, *World, *m_Player, a_BlockX, a_BlockY, a_BlockZ); World->BroadcastSoundParticleEffect(EffectID::PARTICLE_SMOKE, a_BlockX, a_BlockY, a_BlockZ, a_OldBlock, this); // This call would remove the water, placed from the ice block handler if (!((a_OldBlock == E_BLOCK_ICE) && (ChunkInterface.GetBlock(a_BlockX, a_BlockY, a_BlockZ) == E_BLOCK_WATER))) @@ -1423,7 +1423,7 @@ void cClientHandle::HandleRightClick(int a_BlockX, int a_BlockY, int a_BlockZ, e cChunkInterface ChunkInterface(World->GetChunkMap()); BLOCKTYPE BlockType = World->GetBlock(a_BlockX, a_BlockY, a_BlockZ); cBlockHandler * BlockHandler = cBlockInfo::GetHandler(BlockType); - BlockHandler->OnCancelRightClick(ChunkInterface, *World, m_Player, a_BlockX, a_BlockY, a_BlockZ, a_BlockFace); + BlockHandler->OnCancelRightClick(ChunkInterface, *World, *m_Player, a_BlockX, a_BlockY, a_BlockZ, a_BlockFace); if (a_BlockFace != BLOCK_FACE_NONE) { @@ -1486,7 +1486,7 @@ void cClientHandle::HandleRightClick(int a_BlockX, int a_BlockY, int a_BlockZ, e if (!PlgMgr->CallHookPlayerUsingBlock(*m_Player, a_BlockX, a_BlockY, a_BlockZ, a_BlockFace, a_CursorX, a_CursorY, a_CursorZ, BlockType, BlockMeta)) { cChunkInterface ChunkInterface(World->GetChunkMap()); - if (BlockHandler->OnUse(ChunkInterface, *World, m_Player, a_BlockX, a_BlockY, a_BlockZ, a_BlockFace, a_CursorX, a_CursorY, a_CursorZ)) + if (BlockHandler->OnUse(ChunkInterface, *World, *m_Player, a_BlockX, a_BlockY, a_BlockZ, a_BlockFace, a_CursorX, a_CursorY, a_CursorZ)) { // block use was successful, we're done PlgMgr->CallHookPlayerUsedBlock(*m_Player, a_BlockX, a_BlockY, a_BlockZ, a_BlockFace, a_CursorX, a_CursorY, a_CursorZ, BlockType, BlockMeta); |