From 25e0ba4d642bf246cd1829c27a14ac67396057dc Mon Sep 17 00:00:00 2001 From: Walter Julius Hennecke Date: Wed, 7 Dec 2011 12:47:40 +0100 Subject: [PATCH] Added lua library for refentities (not finished yet) --- cgame/Makefile | 3 +++ cgame/cg_lua.h | 7 +++++++ 2 files changed, 10 insertions(+) diff --git a/cgame/Makefile b/cgame/Makefile index fed1507..c2f61f2 100644 --- a/cgame/Makefile +++ b/cgame/Makefile @@ -61,6 +61,7 @@ OBJ = \ lua_qmath.o \ lua_cfx.o \ lua_cent.o \ + lua_refent.o \ # depency objects from game OBJDEP = \ @@ -155,6 +156,8 @@ lua_qmath.o: ../game/lua_qmath.c; $(DO_CC) lua_vector.o: ../game/lua_vector.c; $(DO_CC) lua_cfx.o: lua_cfx.c; $(DO_CC) lua_cent.o: lua_cent.c; $(DO_CC) +lua_refent.o: lua_refent.c; $(DO_CC); + # dependencies from game q_shared.o: ../game/q_shared.c; $(DO_CC) diff --git a/cgame/cg_lua.h b/cgame/cg_lua.h index 50de858..e2940ea 100644 --- a/cgame/cg_lua.h +++ b/cgame/cg_lua.h @@ -97,5 +97,12 @@ int Luaopen_Cent(lua_State *L); void Lua_PushCent(lua_State *L, centity_t *ent); cent_t *Lua_GetCent(lua_State *L, int argNum); // lua_refent.c +typedef struct { + refEntity_t *r; +} rent_t; + +int Luaopen_Rent(lua_State *L); +void Lua_PushRent(lua_State *L, refEntity_t *rent); +rent_t *Lua_GetRent(lua_State *L, int argNum); #endif