summaryrefslogtreecommitdiffstats
path: root/src/Bindings
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2014-10-19 11:46:38 +0200
committerMattes D <github@xoft.cz>2014-10-19 11:46:38 +0200
commitebd31ff1321aeb23b5698d74c08f599a2fa62988 (patch)
tree4e62f334b5cdcf7d7c2c8a7a832211afc724d3ba /src/Bindings
parentBindings: Removed obsolete codegen files. (diff)
downloadcuberite-ebd31ff1321aeb23b5698d74c08f599a2fa62988.tar
cuberite-ebd31ff1321aeb23b5698d74c08f599a2fa62988.tar.gz
cuberite-ebd31ff1321aeb23b5698d74c08f599a2fa62988.tar.bz2
cuberite-ebd31ff1321aeb23b5698d74c08f599a2fa62988.tar.lz
cuberite-ebd31ff1321aeb23b5698d74c08f599a2fa62988.tar.xz
cuberite-ebd31ff1321aeb23b5698d74c08f599a2fa62988.tar.zst
cuberite-ebd31ff1321aeb23b5698d74c08f599a2fa62988.zip
Diffstat (limited to 'src/Bindings')
-rw-r--r--src/Bindings/LuaState.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Bindings/LuaState.cpp b/src/Bindings/LuaState.cpp
index 85e3f9fc5..63170660b 100644
--- a/src/Bindings/LuaState.cpp
+++ b/src/Bindings/LuaState.cpp
@@ -16,6 +16,8 @@ extern "C"
#include "Bindings.h"
#include "ManualBindings.h"
#include "DeprecatedBindings.h"
+#include "../Entities/Entity.h"
+#include "../BlockEntities/BlockEntity.h"
// fwd: SQLite/lsqlite3.c
extern "C"
@@ -556,7 +558,7 @@ void cLuaState::Push(cEntity * a_Entity)
{
ASSERT(IsValid());
- tolua_pushusertype(m_LuaState, a_Entity, "cEntity");
+ tolua_pushusertype(m_LuaState, a_Entity, (a_Entity == nullptr) ? "cEntity" : a_Entity->GetClass());
m_NumCurrentFunctionArgs += 1;
}