diff options
author | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2014-04-23 22:06:07 +0200 |
---|---|---|
committer | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2014-04-23 22:06:07 +0200 |
commit | f763242e5c5d8e6469685c4be95d3dc264ed6a67 (patch) | |
tree | b6ce8b9927109ea9c4fe51ba7c4ce90dff05ec7c /src/Items/ItemThrowable.h | |
parent | Compilation fix (diff) | |
download | cuberite-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.h | 5 |
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()) { |