summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2014-09-03 23:05:22 +0200
committermadmaxoft <github@xoft.cz>2014-09-03 23:05:22 +0200
commit014a55a15ac77d274538236228ec990be9269080 (patch)
tree3c3bd2a81b78f21eabbaaa1750a38520da2ae676 /src
parentLuaState: Fixed referenced function pushing. (diff)
downloadcuberite-014a55a15ac77d274538236228ec990be9269080.tar
cuberite-014a55a15ac77d274538236228ec990be9269080.tar.gz
cuberite-014a55a15ac77d274538236228ec990be9269080.tar.bz2
cuberite-014a55a15ac77d274538236228ec990be9269080.tar.lz
cuberite-014a55a15ac77d274538236228ec990be9269080.tar.xz
cuberite-014a55a15ac77d274538236228ec990be9269080.tar.zst
cuberite-014a55a15ac77d274538236228ec990be9269080.zip
Diffstat (limited to '')
-rw-r--r--src/Bindings/LuaState.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Bindings/LuaState.cpp b/src/Bindings/LuaState.cpp
index 4ebb1e92f..ba2f3c5e0 100644
--- a/src/Bindings/LuaState.cpp
+++ b/src/Bindings/LuaState.cpp
@@ -862,9 +862,9 @@ void cLuaState::GetStackValue(int a_StackPos, eWeather & a_ReturnedVal)
void cLuaState::GetStackValue(int a_StackPos, pBoundingBox & a_ReturnedVal)
{
tolua_Error err;
- if (tolua_isusertable(m_LuaState, a_StackPos, "cBoundingBox", false, &err))
+ if (tolua_isusertype(m_LuaState, a_StackPos, "cBoundingBox", false, &err))
{
- a_ReturnedVal = (cBoundingBox *)lua_touserdata(m_LuaState, a_StackPos);
+ a_ReturnedVal = *((cBoundingBox **)lua_touserdata(m_LuaState, a_StackPos));
}
}
@@ -875,9 +875,9 @@ void cLuaState::GetStackValue(int a_StackPos, pBoundingBox & a_ReturnedVal)
void cLuaState::GetStackValue(int a_StackPos, pWorld & a_ReturnedVal)
{
tolua_Error err;
- if (tolua_isusertable(m_LuaState, a_StackPos, "cWorld", false, &err))
+ if (tolua_isusertype(m_LuaState, a_StackPos, "cWorld", false, &err))
{
- a_ReturnedVal = (cWorld *)lua_touserdata(m_LuaState, a_StackPos);
+ a_ReturnedVal = *((cWorld **)lua_touserdata(m_LuaState, a_StackPos));
}
}