diff options
author | Mattes D <github@xoft.cz> | 2014-08-22 10:33:15 +0200 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2014-08-22 10:33:15 +0200 |
commit | 51df169ad58f4712312d0400043cf2094fc9dfd6 (patch) | |
tree | 6fd57bdda1463bbf79cdfb79660955a4e4f569ea /src/Bindings/LuaState.cpp | |
parent | ToLua++ lib: Assert when usertype is not known. (diff) | |
download | cuberite-51df169ad58f4712312d0400043cf2094fc9dfd6.tar cuberite-51df169ad58f4712312d0400043cf2094fc9dfd6.tar.gz cuberite-51df169ad58f4712312d0400043cf2094fc9dfd6.tar.bz2 cuberite-51df169ad58f4712312d0400043cf2094fc9dfd6.tar.lz cuberite-51df169ad58f4712312d0400043cf2094fc9dfd6.tar.xz cuberite-51df169ad58f4712312d0400043cf2094fc9dfd6.tar.zst cuberite-51df169ad58f4712312d0400043cf2094fc9dfd6.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Bindings/LuaState.cpp | 46 |
1 files changed, 41 insertions, 5 deletions
diff --git a/src/Bindings/LuaState.cpp b/src/Bindings/LuaState.cpp index e123a87c9..9fe93ccc2 100644 --- a/src/Bindings/LuaState.cpp +++ b/src/Bindings/LuaState.cpp @@ -460,7 +460,43 @@ void cLuaState::Push(const Vector3d & a_Vector) { ASSERT(IsValid()); - tolua_pushusertype(m_LuaState, (void *)&a_Vector, "Vector3d"); + tolua_pushusertype(m_LuaState, (void *)&a_Vector, "Vector3<double>"); + m_NumCurrentFunctionArgs += 1; +} + + + + + +void cLuaState::Push(const Vector3d * a_Vector) +{ + ASSERT(IsValid()); + + tolua_pushusertype(m_LuaState, (void *)a_Vector, "Vector3<double>"); + m_NumCurrentFunctionArgs += 1; +} + + + + + +void cLuaState::Push(const Vector3i & a_Vector) +{ + ASSERT(IsValid()); + + tolua_pushusertype(m_LuaState, (void *)&a_Vector, "Vector3<int>"); + m_NumCurrentFunctionArgs += 1; +} + + + + + +void cLuaState::Push(const Vector3i * a_Vector) +{ + ASSERT(IsValid()); + + tolua_pushusertype(m_LuaState, (void *)a_Vector, "Vector3<int>"); m_NumCurrentFunctionArgs += 1; } @@ -708,11 +744,11 @@ void cLuaState::Push(TakeDamageInfo * a_TDI) -void cLuaState::Push(Vector3i * a_Vector) +void cLuaState::Push(Vector3d * a_Vector) { ASSERT(IsValid()); - tolua_pushusertype(m_LuaState, a_Vector, "Vector3i"); + tolua_pushusertype(m_LuaState, a_Vector, "Vector3<double>"); m_NumCurrentFunctionArgs += 1; } @@ -720,11 +756,11 @@ void cLuaState::Push(Vector3i * a_Vector) -void cLuaState::Push(Vector3d * a_Vector) +void cLuaState::Push(Vector3i * a_Vector) { ASSERT(IsValid()); - tolua_pushusertype(m_LuaState, a_Vector, "Vector3d"); + tolua_pushusertype(m_LuaState, a_Vector, "Vector3<int>"); m_NumCurrentFunctionArgs += 1; } |