diff options
author | madmaxoft <github@xoft.cz> | 2013-08-08 09:13:13 +0200 |
---|---|---|
committer | madmaxoft <github@xoft.cz> | 2013-08-08 09:13:13 +0200 |
commit | 3f4abe8c95e4d37a84018ca4d478a908fca423ac (patch) | |
tree | 4315077d767775ae9bd938a6301d59c0191c507d /source/LuaState.cpp | |
parent | Merge branch 'master' of github.com:mc-server/MCServer (diff) | |
download | cuberite-3f4abe8c95e4d37a84018ca4d478a908fca423ac.tar cuberite-3f4abe8c95e4d37a84018ca4d478a908fca423ac.tar.gz cuberite-3f4abe8c95e4d37a84018ca4d478a908fca423ac.tar.bz2 cuberite-3f4abe8c95e4d37a84018ca4d478a908fca423ac.tar.lz cuberite-3f4abe8c95e4d37a84018ca4d478a908fca423ac.tar.xz cuberite-3f4abe8c95e4d37a84018ca4d478a908fca423ac.tar.zst cuberite-3f4abe8c95e4d37a84018ca4d478a908fca423ac.zip |
Diffstat (limited to '')
-rw-r--r-- | source/LuaState.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/source/LuaState.cpp b/source/LuaState.cpp index 664ba8147..d4beb249b 100644 --- a/source/LuaState.cpp +++ b/source/LuaState.cpp @@ -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()); |