diff options
author | Howaner <franzi.moos@googlemail.com> | 2014-09-02 20:03:42 +0200 |
---|---|---|
committer | Howaner <franzi.moos@googlemail.com> | 2014-09-02 20:03:42 +0200 |
commit | d3b8100a7b84a465ca52238d459bb10d32940c46 (patch) | |
tree | 2c272ec985b9228ef2e4892aeeabefa54786d215 /src/Items | |
parent | Removed SexyMotd link (diff) | |
parent | Re-added alternate spellings of darkgraywool. (diff) | |
download | cuberite-d3b8100a7b84a465ca52238d459bb10d32940c46.tar cuberite-d3b8100a7b84a465ca52238d459bb10d32940c46.tar.gz cuberite-d3b8100a7b84a465ca52238d459bb10d32940c46.tar.bz2 cuberite-d3b8100a7b84a465ca52238d459bb10d32940c46.tar.lz cuberite-d3b8100a7b84a465ca52238d459bb10d32940c46.tar.xz cuberite-d3b8100a7b84a465ca52238d459bb10d32940c46.tar.zst cuberite-d3b8100a7b84a465ca52238d459bb10d32940c46.zip |
Diffstat (limited to 'src/Items')
-rw-r--r-- | src/Items/ItemBow.h | 12 | ||||
-rw-r--r-- | src/Items/ItemHandler.h | 2 |
2 files changed, 12 insertions, 2 deletions
diff --git a/src/Items/ItemBow.h b/src/Items/ItemBow.h index fdc24689c..f29cc5d59 100644 --- a/src/Items/ItemBow.h +++ b/src/Items/ItemBow.h @@ -75,7 +75,6 @@ public: Arrow = NULL; return; } - a_Player->GetWorld()->BroadcastSoundEffect("random.bow", a_Player->GetPosX(), a_Player->GetPosY(), a_Player->GetPosZ(), 0.5, (float)Force); if (!a_Player->IsGameModeCreative()) { @@ -83,8 +82,19 @@ public: { a_Player->GetInventory().RemoveItem(cItem(E_ITEM_ARROW)); } + else + { + Arrow->SetPickupState(cArrowEntity::psNoPickup); + } + + a_Player->UseEquippedItem(); } + + if (a_Player->GetEquippedItem().m_Enchantments.GetLevel(cEnchantments::enchFlame) > 0) + { + Arrow->StartBurning(100); + } } } ; diff --git a/src/Items/ItemHandler.h b/src/Items/ItemHandler.h index 8b554ee34..67c250a97 100644 --- a/src/Items/ItemHandler.h +++ b/src/Items/ItemHandler.h @@ -75,7 +75,7 @@ public: int FoodLevel; double Saturation; - FoodInfo(int a_FoodLevel, double a_Saturation, int a_PoisonChance = 0) : + FoodInfo(int a_FoodLevel, double a_Saturation) : FoodLevel(a_FoodLevel), Saturation(a_Saturation) { |