summaryrefslogtreecommitdiffstats
path: root/src/Entities/ProjectileEntity.cpp
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2014-06-01 20:10:03 +0200
committerMattes D <github@xoft.cz>2014-06-01 20:10:03 +0200
commit61edb83ce54b3d50693b4c313f85602d889a9a0d (patch)
treeb367e6851fe03a062b49bd0bce8f9fddfafe964a /src/Entities/ProjectileEntity.cpp
parentabort does not take a parameter. (diff)
parentMade a_BlockHitPos a reference (diff)
downloadcuberite-61edb83ce54b3d50693b4c313f85602d889a9a0d.tar
cuberite-61edb83ce54b3d50693b4c313f85602d889a9a0d.tar.gz
cuberite-61edb83ce54b3d50693b4c313f85602d889a9a0d.tar.bz2
cuberite-61edb83ce54b3d50693b4c313f85602d889a9a0d.tar.lz
cuberite-61edb83ce54b3d50693b4c313f85602d889a9a0d.tar.xz
cuberite-61edb83ce54b3d50693b4c313f85602d889a9a0d.tar.zst
cuberite-61edb83ce54b3d50693b4c313f85602d889a9a0d.zip
Diffstat (limited to 'src/Entities/ProjectileEntity.cpp')
-rw-r--r--src/Entities/ProjectileEntity.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Entities/ProjectileEntity.cpp b/src/Entities/ProjectileEntity.cpp
index 3e48d310c..95c494569 100644
--- a/src/Entities/ProjectileEntity.cpp
+++ b/src/Entities/ProjectileEntity.cpp
@@ -76,12 +76,12 @@ protected:
eBlockFace Face;
if (bb.CalcLineIntersection(Line1, Line2, LineCoeff, Face))
{
- if (cPluginManager::Get()->CallHookProjectileHitBlock(*m_Projectile))
+ Vector3d Intersection = Line1 + m_Projectile->GetSpeed() * LineCoeff;
+ if (cPluginManager::Get()->CallHookProjectileHitBlock(*m_Projectile, a_BlockX, a_BlockY, a_BlockZ, Face, &Intersection))
{
return false;
}
- Vector3d Intersection = Line1 + m_Projectile->GetSpeed() * LineCoeff;
m_Projectile->OnHitSolidBlock(Intersection, Face);
return true;
}