summaryrefslogtreecommitdiffstats
path: root/src/Bindings/LuaState.cpp
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2014-10-19 12:46:25 +0200
committerMattes D <github@xoft.cz>2014-10-19 12:46:25 +0200
commitb0a59927fb7531f6c909e6f581035568c79b625c (patch)
tree9837f6962a6744c6da9fb614c20ec7f46825a7c4 /src/Bindings/LuaState.cpp
parentLuaState: Pushing a cEntity pushes the correct class name. (diff)
downloadcuberite-b0a59927fb7531f6c909e6f581035568c79b625c.tar
cuberite-b0a59927fb7531f6c909e6f581035568c79b625c.tar.gz
cuberite-b0a59927fb7531f6c909e6f581035568c79b625c.tar.bz2
cuberite-b0a59927fb7531f6c909e6f581035568c79b625c.tar.lz
cuberite-b0a59927fb7531f6c909e6f581035568c79b625c.tar.xz
cuberite-b0a59927fb7531f6c909e6f581035568c79b625c.tar.zst
cuberite-b0a59927fb7531f6c909e6f581035568c79b625c.zip
Diffstat (limited to '')
-rw-r--r--src/Bindings/LuaState.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Bindings/LuaState.cpp b/src/Bindings/LuaState.cpp
index 63170660b..49d643688 100644
--- a/src/Bindings/LuaState.cpp
+++ b/src/Bindings/LuaState.cpp
@@ -522,7 +522,7 @@ void cLuaState::Push(cBlockEntity * a_BlockEntity)
{
ASSERT(IsValid());
- tolua_pushusertype(m_LuaState, a_BlockEntity, "cBlockEntity");
+ tolua_pushusertype(m_LuaState, a_BlockEntity, (a_BlockEntity == nullptr) ? "cBlockEntity" : a_BlockEntity->GetClass());
m_NumCurrentFunctionArgs += 1;
}