summaryrefslogtreecommitdiffstats
path: root/src/Bindings/LuaState.cpp
diff options
context:
space:
mode:
authorMasy98 <masy@antheruscraft.de>2014-09-06 22:06:40 +0200
committerMasy98 <masy@antheruscraft.de>2014-09-06 22:06:40 +0200
commit9cdb9b6262a0d6ffb9f83c20ca3c9483fb245aaa (patch)
tree500cd7ff84cbf42e34eb95225e83c3f18c4258c0 /src/Bindings/LuaState.cpp
parentFixed typo! (diff)
parentMerge remote-tracking branch 'upstream/master' (diff)
downloadcuberite-9cdb9b6262a0d6ffb9f83c20ca3c9483fb245aaa.tar
cuberite-9cdb9b6262a0d6ffb9f83c20ca3c9483fb245aaa.tar.gz
cuberite-9cdb9b6262a0d6ffb9f83c20ca3c9483fb245aaa.tar.bz2
cuberite-9cdb9b6262a0d6ffb9f83c20ca3c9483fb245aaa.tar.lz
cuberite-9cdb9b6262a0d6ffb9f83c20ca3c9483fb245aaa.tar.xz
cuberite-9cdb9b6262a0d6ffb9f83c20ca3c9483fb245aaa.tar.zst
cuberite-9cdb9b6262a0d6ffb9f83c20ca3c9483fb245aaa.zip
Diffstat (limited to 'src/Bindings/LuaState.cpp')
-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..ba2f3c5e0 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_isusertype(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_isusertype(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