1
0

Fixed error when the hook gets called.

This commit is contained in:
STRWarrior 2014-03-29 15:43:03 +01:00
parent 339d555111
commit a6ef40cb6e
3 changed files with 14 additions and 1 deletions

View File

@ -479,6 +479,18 @@ void cLuaState::Push(cEntity * a_Entity)
void cLuaState::Push(cProjectileEntity * a_ProjectileEntity)
{
ASSERT(IsValid());
tolua_pushusertype(m_LuaState, a_ProjectileEntity, "cProjectileEntity");
m_NumCurrentFunctionArgs += 1;
}
void cLuaState::Push(cMonster * a_Monster)
{
ASSERT(IsValid());

View File

@ -38,6 +38,7 @@ extern "C"
class cWorld;
class cPlayer;
class cEntity;
class cProjectileEntity;
class cMonster;
class cItem;
class cItems;
@ -183,6 +184,7 @@ public:
void Push(cPlayer * a_Player);
void Push(const cPlayer * a_Player);
void Push(cEntity * a_Entity);
void Push(cProjectileEntity * a_ProjectileEntity);
void Push(cMonster * a_Monster);
void Push(cItem * a_Item);
void Push(cItems * a_Items);

View File

@ -148,7 +148,6 @@ public:
}
// TODO: Some entities don't interact with the projectiles (pickups, falling blocks)
// TODO: Allow plugins to interfere about which entities can be hit
if (cPluginManager::Get()->CallHookProjectileHitEntity(*m_Projectile, *a_Entity))
{
// A plugin disagreed.