summaryrefslogtreecommitdiffstats
path: root/src/Items/ItemFishingRod.h
diff options
context:
space:
mode:
authorSTRWarrior <niels.breuker@hotmail.nl>2013-12-21 22:20:54 +0100
committerSTRWarrior <niels.breuker@hotmail.nl>2013-12-21 22:20:54 +0100
commitc67621679159b3ed17b614c4066b334fd78497be (patch)
tree2aae91ebe81393db24344a77039c106154a81264 /src/Items/ItemFishingRod.h
parentOnce again better Y direction for the items given when fishing. (diff)
downloadcuberite-c67621679159b3ed17b614c4066b334fd78497be.tar
cuberite-c67621679159b3ed17b614c4066b334fd78497be.tar.gz
cuberite-c67621679159b3ed17b614c4066b334fd78497be.tar.bz2
cuberite-c67621679159b3ed17b614c4066b334fd78497be.tar.lz
cuberite-c67621679159b3ed17b614c4066b334fd78497be.tar.xz
cuberite-c67621679159b3ed17b614c4066b334fd78497be.tar.zst
cuberite-c67621679159b3ed17b614c4066b334fd78497be.zip
Diffstat (limited to '')
-rw-r--r--src/Items/ItemFishingRod.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/Items/ItemFishingRod.h b/src/Items/ItemFishingRod.h
index e941251b2..80fca2d7f 100644
--- a/src/Items/ItemFishingRod.h
+++ b/src/Items/ItemFishingRod.h
@@ -65,10 +65,10 @@ public:
if (Callbacks.CanPickup())
{
cItems Drops;
- int ItemCategory(a_World->GetTickRandomNumber(99));
+ int ItemCategory = a_World->GetTickRandomNumber(99);
if (ItemCategory <= 4) // Treasures 5%
{
- int Treasure(a_World->GetTickRandomNumber(5));
+ int Treasure = a_World->GetTickRandomNumber(5);
switch (Treasure)
{
case 0:
@@ -105,7 +105,7 @@ public:
}
else if (ItemCategory <= 14) // Junk 10%
{
- int Junk(a_World->GetTickRandomNumber(70));
+ int Junk = a_World->GetTickRandomNumber(70);
if (Junk <= 1)
{
Drops.Add(cItem(E_ITEM_DYE, 10, 0));
@@ -153,7 +153,7 @@ public:
}
else // Fish
{
- int FishType(a_World->GetTickRandomNumber(99));
+ int FishType = a_World->GetTickRandomNumber(99);
if (FishType <= 1) // Clownfish has a 2% chance of spawning
{
Drops.Add(cItem(E_ITEM_RAW_FISH, 1, E_META_RAW_FISH_CLOWNFISH));
@@ -173,8 +173,8 @@ public:
}
- Vector3d FloaterPos(Callbacks.GetPos());
- Vector3d FlyDirection(a_Player->GetEyePosition() - FloaterPos);
+ Vector3d FloaterPos = Callbacks.GetPos();
+ Vector3d FlyDirection = a_Player->GetEyePosition() - FloaterPos;
a_World->SpawnItemPickups(Drops, FloaterPos.x, FloaterPos.y, FloaterPos.z, FlyDirection.x, FlyDirection.y + 1, FlyDirection.z);
}
}