From 61120686c6ad9cdd4a017237b90ec4c9f57cf137 Mon Sep 17 00:00:00 2001 From: STRWarrior Date: Fri, 20 Dec 2013 18:35:13 +0100 Subject: Fish now actualy jumps to the player instead of a few block bellow them. --- src/Items/ItemFishingRod.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Items') diff --git a/src/Items/ItemFishingRod.h b/src/Items/ItemFishingRod.h index 91c0e9638..d23ad7fee 100644 --- a/src/Items/ItemFishingRod.h +++ b/src/Items/ItemFishingRod.h @@ -63,7 +63,7 @@ public: Drops.Add(cItem(E_ITEM_RAW_FISH)); Vector3d FloaterPos(Callbacks.GetPos()); Vector3d FlyDirection(a_Player->GetPosition() - FloaterPos); - a_World->SpawnItemPickups(Drops, FloaterPos.x, FloaterPos.y, FloaterPos.z, FlyDirection.x, FlyDirection.y, FlyDirection.z); + a_World->SpawnItemPickups(Drops, FloaterPos.x, FloaterPos.y, FloaterPos.z, FlyDirection.x, FlyDirection.Length() / (FlyDirection.y * 2), FlyDirection.z); // TODO: More types of pickups. } } -- cgit v1.2.3 From 6afe6b792825bf7c930ef6c3c8f436bc6ecacf9a Mon Sep 17 00:00:00 2001 From: STRWarrior Date: Fri, 20 Dec 2013 19:49:30 +0100 Subject: Increased the range an Floater can shoot to. --- src/Items/ItemFishingRod.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Items') diff --git a/src/Items/ItemFishingRod.h b/src/Items/ItemFishingRod.h index d23ad7fee..8d02b4cb5 100644 --- a/src/Items/ItemFishingRod.h +++ b/src/Items/ItemFishingRod.h @@ -69,7 +69,7 @@ public: } else { - cFloater * Floater = new cFloater(a_Player->GetPosX(), a_Player->GetStance(), a_Player->GetPosZ(), a_Player->GetLookVector() * 7, a_Player->GetUniqueID()); + cFloater * Floater = new cFloater(a_Player->GetPosX(), a_Player->GetStance(), a_Player->GetPosZ(), a_Player->GetLookVector() * 15, a_Player->GetUniqueID()); Floater->Initialize(a_World); a_Player->SetIsFishing(true, Floater->GetUniqueID()); } -- cgit v1.2.3 From 3c73076be46bad9a908085056fff045b777b75de Mon Sep 17 00:00:00 2001 From: STRWarrior Date: Sat, 21 Dec 2013 14:08:58 +0100 Subject: Fixed bug where you could pickup the floater only to get one spawned instantly or the other way around. --- src/Items/ItemFishingRod.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/Items') diff --git a/src/Items/ItemFishingRod.h b/src/Items/ItemFishingRod.h index 8d02b4cb5..87021fbd2 100644 --- a/src/Items/ItemFishingRod.h +++ b/src/Items/ItemFishingRod.h @@ -29,6 +29,11 @@ public: virtual bool OnItemUse(cWorld * a_World, cPlayer * a_Player, const cItem & a_Item, int a_BlockX, int a_BlockY, int a_BlockZ, char a_Dir) override { + if (a_Dir != BLOCK_FACE_NONE) + { + return false; + } + if (a_Player->IsFishing()) { class cFloaterCallback : -- cgit v1.2.3