1
0

Addeed OnSpawningEntity, OnSpawnedEntity, OnSpawningMonster, OnSpawnedMonster hooks.

As requested in FS 418.
This commit is contained in:
madmaxoft
2013-08-08 09:13:13 +02:00
parent be7a6d7a66
commit 3f4abe8c95
25 changed files with 405 additions and 38 deletions

View File

@@ -396,6 +396,19 @@ void cLuaState::PushObject(cEntity * a_Entity)
void cLuaState::PushObject(cMonster * a_Monster)
{
ASSERT(IsValid());
ASSERT(m_NumCurrentFunctionArgs >= 0); // A function must be pushed to stack first
tolua_pushusertype(m_LuaState, a_Monster, "cMonster");
m_NumCurrentFunctionArgs += 1;
}
void cLuaState::PushObject(cItem * a_Item)
{
ASSERT(IsValid());