summaryrefslogtreecommitdiffstats
path: root/src/Items/ItemFishingRod.h
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2019-09-29 14:59:24 +0200
committerGitHub <noreply@github.com>2019-09-29 14:59:24 +0200
commit365cbc6e1cea96741e26c9ce912b003f8fd2c62c (patch)
treef23682c47928597791c53f3a300b03494ffde417 /src/Items/ItemFishingRod.h
parentCactus can now grow and will be dropped if there is no place to grow. (diff)
downloadcuberite-365cbc6e1cea96741e26c9ce912b003f8fd2c62c.tar
cuberite-365cbc6e1cea96741e26c9ce912b003f8fd2c62c.tar.gz
cuberite-365cbc6e1cea96741e26c9ce912b003f8fd2c62c.tar.bz2
cuberite-365cbc6e1cea96741e26c9ce912b003f8fd2c62c.tar.lz
cuberite-365cbc6e1cea96741e26c9ce912b003f8fd2c62c.tar.xz
cuberite-365cbc6e1cea96741e26c9ce912b003f8fd2c62c.tar.zst
cuberite-365cbc6e1cea96741e26c9ce912b003f8fd2c62c.zip
Diffstat (limited to 'src/Items/ItemFishingRod.h')
-rw-r--r--src/Items/ItemFishingRod.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Items/ItemFishingRod.h b/src/Items/ItemFishingRod.h
index e452951fd..60e0617d6 100644
--- a/src/Items/ItemFishingRod.h
+++ b/src/Items/ItemFishingRod.h
@@ -228,9 +228,9 @@ public:
FloaterPos.y += 0.5f;
const float FISH_SPEED_MULT = 2.25f;
- Vector3d FlyDirection = a_Player->GetEyePosition() - FloaterPos;
- a_World->SpawnItemPickups(Drops, FloaterPos.x, FloaterPos.y, FloaterPos.z, FlyDirection.x * FISH_SPEED_MULT, (FlyDirection.y + 1.0f) * FISH_SPEED_MULT, FlyDirection.z * FISH_SPEED_MULT);
- a_World->SpawnExperienceOrb(a_Player->GetPosX(), a_Player->GetPosY(), a_Player->GetPosZ(), Random.RandInt(1, 6));
+ Vector3d FlyDirection = (a_Player->GetEyePosition() - FloaterPos).addedY(1.0f) * FISH_SPEED_MULT;
+ a_World->SpawnItemPickups(Drops, FloaterPos, FlyDirection);
+ a_World->SpawnExperienceOrb(a_Player->GetPosition(), Random.RandInt(1, 6));
a_Player->UseEquippedItem(1);
cRoot::Get()->GetPluginManager()->CallHookPlayerFished(*a_Player, Drops);
}
@@ -245,7 +245,7 @@ public:
}
else
{
- auto Floater = cpp14::make_unique<cFloater>(a_Player->GetPosX(), a_Player->GetStance(), a_Player->GetPosZ(), a_Player->GetLookVector() * 15, a_Player->GetUniqueID(), (Random.RandInt(100, 900) - static_cast<int>(a_Player->GetEquippedItem().m_Enchantments.GetLevel(cEnchantments::enchLure) * 100)));
+ auto Floater = cpp14::make_unique<cFloater>(a_Player->GetEyePosition(), a_Player->GetLookVector() * 15, a_Player->GetUniqueID(), (Random.RandInt(100, 900) - static_cast<int>(a_Player->GetEquippedItem().m_Enchantments.GetLevel(cEnchantments::enchLure) * 100)));
auto FloaterPtr = Floater.get();
if (!FloaterPtr->Initialize(std::move(Floater), *a_World))
{