From 921cfb8d147aea751bb494b4a88efe4cb75daa68 Mon Sep 17 00:00:00 2001 From: Alexander Pickering Date: Sun, 23 Sep 2018 16:07:21 -0400 Subject: Started moving generic physics into it's own file Created bphysgeneric that holds all the shared code for bullet rigidbodies. It needs to be included in any structs that have a rigidbody field. --- src/client/lua_api/phys/bphysgeneric.hpp | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 src/client/lua_api/phys/bphysgeneric.hpp (limited to 'src/client/lua_api/phys/bphysgeneric.hpp') diff --git a/src/client/lua_api/phys/bphysgeneric.hpp b/src/client/lua_api/phys/bphysgeneric.hpp new file mode 100644 index 0000000..56bfaed --- /dev/null +++ b/src/client/lua_api/phys/bphysgeneric.hpp @@ -0,0 +1,24 @@ + +extern "C" { + #include + #include + #include +} + + +int setgravity(lua_State *L); +int applyforce(lua_State *L); +int getlineardamping(lua_State *L); +int getangulardamping(lua_State *L); +int setdamping(lua_State *L); +int activate(lua_State *L); + +static const luaL_reg brigidbody_m[] = { + {"setgravity", setgravity}, + {"applyforce", applyforce}, + {"getldamping", getlineardamping}, + {"getadamping", getangulardamping}, + {"setdamping", setdamping}, + {"activate", activate}, + {NULL, NULL} +}; -- cgit v1.2.3-70-g09d2