aboutsummaryrefslogtreecommitdiff
path: root/src/shared/lua_api/common.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/shared/lua_api/common.cpp')
-rw-r--r--src/shared/lua_api/common.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/shared/lua_api/common.cpp b/src/shared/lua_api/common.cpp
index b190bdb..55f2b23 100644
--- a/src/shared/lua_api/common.cpp
+++ b/src/shared/lua_api/common.cpp
@@ -37,6 +37,27 @@ void loadLLibs(lua_State* L){
*/
}
+int pushvector4i(lua_State* L,long a, long b, long c, long d){
+ lua_newtable(L);//{}
+
+ lua_pushinteger(L,1);//{},1
+ lua_pushinteger(L,a);//{},1,a
+ lua_settable(L,-3);//{}
+
+ lua_pushinteger(L,2);//{},2
+ lua_pushinteger(L,b);//{},2,b
+ lua_settable(L,-3);//{}
+
+ lua_pushinteger(L,3);//{},3
+ lua_pushinteger(L,c);//{},3,c
+ lua_settable(L,-3);//{}
+
+ lua_pushinteger(L,4);//{},4
+ lua_pushinteger(L,d);//{},4,d
+ lua_settable(L,-3);{}
+
+ return 1;
+}
int pushvector3i(lua_State* L,long a,long b,long c){
lua_newtable(L);//{}