diff options
Diffstat (limited to '')
-rw-r--r-- | src/Items/ItemBow.h | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/src/Items/ItemBow.h b/src/Items/ItemBow.h index 81f012c7c..b7a9ef638 100644 --- a/src/Items/ItemBow.h +++ b/src/Items/ItemBow.h @@ -22,9 +22,15 @@ public: + + virtual bool OnItemUse( - cWorld * a_World, cPlayer * a_Player, cBlockPluginInterface & a_PluginInterface, const cItem & a_Item, - int a_BlockX, int a_BlockY, int a_BlockZ, eBlockFace a_BlockFace + cWorld * a_World, + cPlayer * a_Player, + cBlockPluginInterface & a_PluginInterface, + const cItem & a_HeldItem, + const Vector3i a_ClickedBlockPos, + eBlockFace a_ClickedBlockFace ) override { ASSERT(a_Player != nullptr); @@ -41,9 +47,10 @@ public: - virtual void OnItemShoot(cPlayer * a_Player, int a_BlockX, int a_BlockY, int a_BlockZ, eBlockFace a_BlockFace) override + virtual void OnItemShoot(cPlayer * a_Player, const Vector3i a_BlockPos, eBlockFace a_BlockFace) override { - // Actual shot - produce the arrow with speed based on the ticks that the bow was charged + // Actual shot - produce the arrow with speed based on the number of ticks that the bow was charged + UNUSED(a_BlockPos); ASSERT(a_Player != nullptr); int BowCharge = a_Player->FinishChargingBow(); @@ -88,7 +95,6 @@ public: a_Player->UseEquippedItem(); } - if (a_Player->GetEquippedItem().m_Enchantments.GetLevel(cEnchantments::enchFlame) > 0) { ArrowPtr->StartBurning(100); |