summaryrefslogtreecommitdiffstats
path: root/source/ClientHandle.cpp
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-05-19 20:22:37 +0200
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-05-19 20:22:37 +0200
commit90c398a3926f097e51955817e2829d831ae2bd2b (patch)
treeaf4e2d236a5e0595f19975dcd2295c60c4a59712 /source/ClientHandle.cpp
parentDebuggers: sorted things into separate functions, commented out most of them; added ForEachEntity() testing - list all and kill all entities. (diff)
downloadcuberite-90c398a3926f097e51955817e2829d831ae2bd2b.tar
cuberite-90c398a3926f097e51955817e2829d831ae2bd2b.tar.gz
cuberite-90c398a3926f097e51955817e2829d831ae2bd2b.tar.bz2
cuberite-90c398a3926f097e51955817e2829d831ae2bd2b.tar.lz
cuberite-90c398a3926f097e51955817e2829d831ae2bd2b.tar.xz
cuberite-90c398a3926f097e51955817e2829d831ae2bd2b.tar.zst
cuberite-90c398a3926f097e51955817e2829d831ae2bd2b.zip
Diffstat (limited to 'source/ClientHandle.cpp')
-rw-r--r--source/ClientHandle.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/source/ClientHandle.cpp b/source/ClientHandle.cpp
index e52f521f9..1ea94c8c2 100644
--- a/source/ClientHandle.cpp
+++ b/source/ClientHandle.cpp
@@ -641,7 +641,7 @@ void cClientHandle::HandleBlockDigStarted(int a_BlockX, int a_BlockY, int a_Bloc
Handler->OnDigging(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);
+ ItemHandler->OnDiggingBlock(World, m_Player, m_Player->GetEquippedItem(), a_BlockX, a_BlockY, a_BlockZ, a_BlockFace);
// Check for clickthrough-blocks:
if (a_BlockFace != BLOCK_FACE_NONE)
@@ -701,7 +701,7 @@ void cClientHandle::HandleBlockDigFinished(int a_BlockX, int a_BlockY, int a_Blo
}
cWorld * World = m_Player->GetWorld();
- ItemHandler->OnBlockDestroyed(World, m_Player, &m_Player->GetEquippedItem(), a_BlockX, a_BlockY, a_BlockZ);
+ ItemHandler->OnBlockDestroyed(World, m_Player, m_Player->GetEquippedItem(), a_BlockX, a_BlockY, a_BlockZ);
BlockHandler(a_OldBlock)->OnDestroyedByPlayer(World, m_Player, a_BlockX, a_BlockY, a_BlockZ);
World->BroadcastSoundParticleEffect(2001, a_BlockX * 8, a_BlockY * 8, a_BlockZ * 8, a_OldBlock, this);
@@ -738,7 +738,7 @@ void cClientHandle::HandleRightClick(int a_BlockX, int a_BlockY, int a_BlockZ, c
return;
}
- cItem & Equipped = m_Player->GetInventory().GetEquippedItem();
+ const cItem & Equipped = m_Player->GetInventory().GetEquippedItem();
if ((Equipped.m_ItemType != a_HeldItem.m_ItemType) && (a_HeldItem.m_ItemType != -1))
{
@@ -802,7 +802,7 @@ void cClientHandle::HandleRightClick(int a_BlockX, int a_BlockY, int a_BlockZ, c
// A plugin doesn't agree with using the item, abort
return;
}
- ItemHandler->OnItemUse(World, m_Player, &Equipped, a_BlockX, a_BlockY, a_BlockZ, a_BlockFace);
+ ItemHandler->OnItemUse(World, m_Player, Equipped, a_BlockX, a_BlockY, a_BlockZ, a_BlockFace);
PlgMgr->CallHookPlayerUsedItem(*m_Player, a_BlockX, a_BlockY, a_BlockZ, a_BlockFace, a_CursorX, a_CursorY, a_CursorZ);
}
}
@@ -993,7 +993,7 @@ void cClientHandle::HandleAnimation(char a_Animation)
void cClientHandle::HandleSlotSelected(short a_SlotNum)
{
- m_Player->GetInventory().SetEquippedSlot(a_SlotNum);
+ m_Player->GetInventory().SetEquippedSlotNum(a_SlotNum);
m_Player->GetWorld()->BroadcastEntityEquipment(*m_Player, 0, m_Player->GetInventory().GetEquippedItem(), this);
}