summaryrefslogtreecommitdiffstats
path: root/src/Entities
diff options
context:
space:
mode:
authorSTRWarrior <niels.breuker@hotmail.nl>2014-03-29 16:00:45 +0100
committerSTRWarrior <niels.breuker@hotmail.nl>2014-03-29 16:00:45 +0100
commitec4638a228edcf4c745088838e972ea07edc7cba (patch)
tree280182543c9788b7bc19bcc47c1a7ed2dc4ba3db /src/Entities
parentFixed error when the hook gets called. (diff)
downloadcuberite-ec4638a228edcf4c745088838e972ea07edc7cba.tar
cuberite-ec4638a228edcf4c745088838e972ea07edc7cba.tar.gz
cuberite-ec4638a228edcf4c745088838e972ea07edc7cba.tar.bz2
cuberite-ec4638a228edcf4c745088838e972ea07edc7cba.tar.lz
cuberite-ec4638a228edcf4c745088838e972ea07edc7cba.tar.xz
cuberite-ec4638a228edcf4c745088838e972ea07edc7cba.tar.zst
cuberite-ec4638a228edcf4c745088838e972ea07edc7cba.zip
Diffstat (limited to 'src/Entities')
-rw-r--r--src/Entities/ProjectileEntity.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/Entities/ProjectileEntity.cpp b/src/Entities/ProjectileEntity.cpp
index 07cb34f35..b724c9c55 100644
--- a/src/Entities/ProjectileEntity.cpp
+++ b/src/Entities/ProjectileEntity.cpp
@@ -67,6 +67,11 @@ protected:
eBlockFace Face;
if (bb.CalcLineIntersection(Line1, Line2, LineCoeff, Face))
{
+ if (cPluginManager::Get()->CallHookProjectileHitBlock(*m_Projectile))
+ {
+ return true;
+ }
+
Vector3d Intersection = Line1 + m_Projectile->GetSpeed() * LineCoeff;
m_Projectile->OnHitSolidBlock(Intersection, Face);
return true;