summaryrefslogtreecommitdiffstats
path: root/src/Bindings/LuaState.cpp
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2014-09-04 22:25:19 +0200
committerMattes D <github@xoft.cz>2014-09-04 22:25:19 +0200
commite9dda864eae043da5664a683ab08910c3081e571 (patch)
tree040923a3d26266e1ccbce3f3ee44079c511702b9 /src/Bindings/LuaState.cpp
parentMerge pull request #1371 from DayBr3ak/master (diff)
parentFixed compilation after chunk Y removal. (diff)
downloadcuberite-e9dda864eae043da5664a683ab08910c3081e571.tar
cuberite-e9dda864eae043da5664a683ab08910c3081e571.tar.gz
cuberite-e9dda864eae043da5664a683ab08910c3081e571.tar.bz2
cuberite-e9dda864eae043da5664a683ab08910c3081e571.tar.lz
cuberite-e9dda864eae043da5664a683ab08910c3081e571.tar.xz
cuberite-e9dda864eae043da5664a683ab08910c3081e571.tar.zst
cuberite-e9dda864eae043da5664a683ab08910c3081e571.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