1
0

Added a BlockHitPos parameter to OnProjectileHitBlock

This commit is contained in:
STRWarrior
2014-03-30 14:04:44 +02:00
parent 47d5395d24
commit 66f1bb7b67
6 changed files with 9 additions and 9 deletions

View File

@@ -1108,14 +1108,14 @@ bool cPluginLua::OnPreCrafting(const cPlayer * a_Player, const cCraftingGrid * a
bool cPluginLua::OnProjectileHitBlock(cProjectileEntity & a_Projectile, eBlockFace a_Face)
bool cPluginLua::OnProjectileHitBlock(cProjectileEntity & a_Projectile, eBlockFace a_Face, Vector3d * a_BlockHitPos)
{
cCSLock Lock(m_CriticalSection);
bool res = false;
cLuaRefs & Refs = m_HookMap[cPluginManager::HOOK_PROJECTILE_HIT_BLOCK];
for (cLuaRefs::iterator itr = Refs.begin(), end = Refs.end(); itr != end; ++itr)
{
m_LuaState.Call((int)(**itr), &a_Projectile, a_Face, cLuaState::Return, res);
m_LuaState.Call((int)(**itr), &a_Projectile, a_Face, a_BlockHitPos, cLuaState::Return, res);
if (res)
{
return true;