1
0

Merge pull request #844 from mc-server/ProjectileHitBlock

OnProjectileHitBlock tweak.
This commit is contained in:
Mattes D
2014-06-01 20:10:03 +02:00
6 changed files with 9 additions and 9 deletions

View File

@@ -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;
}