summaryrefslogtreecommitdiffstats
path: root/src/Items/ItemThrowable.h
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2014-02-27 00:29:14 +0100
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2014-02-27 00:33:52 +0100
commitbaf2d8892127cd6da9d2f6f2f8d991d617c87800 (patch)
tree2f3c2f8d3d9e2659f068e78017a934c195ba77f2 /src/Items/ItemThrowable.h
parentFixed a gcc warning in FastNBT.h. (diff)
downloadcuberite-baf2d8892127cd6da9d2f6f2f8d991d617c87800.tar
cuberite-baf2d8892127cd6da9d2f6f2f8d991d617c87800.tar.gz
cuberite-baf2d8892127cd6da9d2f6f2f8d991d617c87800.tar.bz2
cuberite-baf2d8892127cd6da9d2f6f2f8d991d617c87800.tar.lz
cuberite-baf2d8892127cd6da9d2f6f2f8d991d617c87800.tar.xz
cuberite-baf2d8892127cd6da9d2f6f2f8d991d617c87800.tar.zst
cuberite-baf2d8892127cd6da9d2f6f2f8d991d617c87800.zip
Diffstat (limited to 'src/Items/ItemThrowable.h')
-rw-r--r--src/Items/ItemThrowable.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Items/ItemThrowable.h b/src/Items/ItemThrowable.h
index 46049f961..c6a4e714e 100644
--- a/src/Items/ItemThrowable.h
+++ b/src/Items/ItemThrowable.h
@@ -35,7 +35,7 @@ public:
Vector3d Pos = a_Player->GetThrowStartPos();
Vector3d Speed = a_Player->GetLookVector() * m_SpeedCoeff;
- a_World->CreateProjectile(Pos.x, Pos.y, Pos.z, m_ProjectileKind, a_Player, &Speed);
+ a_World->CreateProjectile(Pos.x, Pos.y, Pos.z, m_ProjectileKind, a_Player, a_Player->GetEquippedItem(), &Speed);
return true;
}
@@ -127,13 +127,13 @@ public:
return false;
}
+ a_World->CreateProjectile(a_BlockX + 0.5, a_BlockY + 1, a_BlockZ + 0.5, m_ProjectileKind, a_Player, a_Player->GetEquippedItem());
+
if (!a_Player->IsGameModeCreative())
{
a_Player->GetInventory().RemoveOneEquippedItem();
}
- a_World->CreateProjectile(a_BlockX + 0.5, a_BlockY + 1, a_BlockZ + 0.5, m_ProjectileKind, a_Player, 0);
-
return true;
}