summaryrefslogtreecommitdiffstats
path: root/src/Bindings/LuaState.cpp
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2014-09-03 17:00:26 +0200
committermadmaxoft <github@xoft.cz>2014-09-03 17:00:26 +0200
commita51c1e0b73a83cddcce865671ca30240393e458f (patch)
tree688e63c296f02e327b4ee2f9e117a172a6e2d85b /src/Bindings/LuaState.cpp
parentcBoundingBox: Added accessors. (diff)
downloadcuberite-a51c1e0b73a83cddcce865671ca30240393e458f.tar
cuberite-a51c1e0b73a83cddcce865671ca30240393e458f.tar.gz
cuberite-a51c1e0b73a83cddcce865671ca30240393e458f.tar.bz2
cuberite-a51c1e0b73a83cddcce865671ca30240393e458f.tar.lz
cuberite-a51c1e0b73a83cddcce865671ca30240393e458f.tar.xz
cuberite-a51c1e0b73a83cddcce865671ca30240393e458f.tar.zst
cuberite-a51c1e0b73a83cddcce865671ca30240393e458f.zip
Diffstat (limited to '')
-rw-r--r--src/Bindings/LuaState.cpp26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/Bindings/LuaState.cpp b/src/Bindings/LuaState.cpp
index 9fe93ccc2..4ebb1e92f 100644
--- a/src/Bindings/LuaState.cpp
+++ b/src/Bindings/LuaState.cpp
@@ -859,6 +859,32 @@ 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))
+ {
+ a_ReturnedVal = (cBoundingBox *)lua_touserdata(m_LuaState, a_StackPos);
+ }
+}
+
+
+
+
+
+void cLuaState::GetStackValue(int a_StackPos, pWorld & a_ReturnedVal)
+{
+ tolua_Error err;
+ if (tolua_isusertable(m_LuaState, a_StackPos, "cWorld", false, &err))
+ {
+ a_ReturnedVal = (cWorld *)lua_touserdata(m_LuaState, a_StackPos);
+ }
+}
+
+
+
+
+
bool cLuaState::CallFunction(int a_NumResults)
{
ASSERT (m_NumCurrentFunctionArgs >= 0); // A function must be pushed to stack first