summaryrefslogtreecommitdiffstats
path: root/src/Items/ItemThrowable.h
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2014-04-23 22:06:07 +0200
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2014-04-23 22:06:07 +0200
commitf763242e5c5d8e6469685c4be95d3dc264ed6a67 (patch)
treeb6ce8b9927109ea9c4fe51ba7c4ce90dff05ec7c /src/Items/ItemThrowable.h
parentCompilation fix (diff)
downloadcuberite-f763242e5c5d8e6469685c4be95d3dc264ed6a67.tar
cuberite-f763242e5c5d8e6469685c4be95d3dc264ed6a67.tar.gz
cuberite-f763242e5c5d8e6469685c4be95d3dc264ed6a67.tar.bz2
cuberite-f763242e5c5d8e6469685c4be95d3dc264ed6a67.tar.lz
cuberite-f763242e5c5d8e6469685c4be95d3dc264ed6a67.tar.xz
cuberite-f763242e5c5d8e6469685c4be95d3dc264ed6a67.tar.zst
cuberite-f763242e5c5d8e6469685c4be95d3dc264ed6a67.zip
Diffstat (limited to '')
-rw-r--r--src/Items/ItemThrowable.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Items/ItemThrowable.h b/src/Items/ItemThrowable.h
index c6a4e714e..f90caf037 100644
--- a/src/Items/ItemThrowable.h
+++ b/src/Items/ItemThrowable.h
@@ -127,7 +127,10 @@ 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_World->CreateProjectile(a_BlockX + 0.5, a_BlockY + 1, a_BlockZ + 0.5, m_ProjectileKind, a_Player, a_Player->GetEquippedItem()) == -1)
+ {
+ return false;
+ }
if (!a_Player->IsGameModeCreative())
{