From 61c0c9f53d3a57ee7fd5db5faa74c4b51e2da396 Mon Sep 17 00:00:00 2001 From: Alexander Pickering Date: Sat, 28 Oct 2017 18:12:50 -0400 Subject: Lots of updates * Networking is finally working * Started moveing physics into the shared domain * Streams now have a readString() and writeString() method * streams are passed to the lua context for networking * Refactored cameras and physboxes to use metatables * Finally wrote the pushvector3* and popvector3* methods * Fixed a few crashes in ;main * Deleted a lot of code --- src/client/lua_api/phys/cbphysbox.cpp | 49 +++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 src/client/lua_api/phys/cbphysbox.cpp (limited to 'src/client/lua_api/phys/cbphysbox.cpp') diff --git a/src/client/lua_api/phys/cbphysbox.cpp b/src/client/lua_api/phys/cbphysbox.cpp new file mode 100644 index 0000000..0da9939 --- /dev/null +++ b/src/client/lua_api/phys/cbphysbox.cpp @@ -0,0 +1,49 @@ + +#include +#include +#include +extern "C" { + #include + #include + #include +} + +#include +#include +#include "cbphysbox.hpp" +#include "../../../shared/lua_api/phys/bphysbox.hpp" + +using namespace irr; +using namespace scene; +using namespace core; +using namespace video; + +extern IrrlichtDevice* device; + +extern btDiscreteDynamicsWorld* World; +extern std::list Objects; +/* +static LBPhysNode* checkisbphysbox(lua_State* L, int index){ + void* ud = luaL_checkudata(L,index,"phys.physbox"); + luaL_argcheck(L,ud != NULL, index, "'phys.physbox' expected"); + return (LBPhysNode*) ud; +} +*/ + +/* +static LISceneNode* checkismesh(lua_State* L){ + return checkismesh(L,1); +} +*/ + +//phys.newphysbox({vector3 size},{vector3 origin},mass) +/* +static int newcbphysbox(lua_State* L){// + newbphysbox(L);//{phys.physbox} + LBPhysNode +} +*/ + +void cbphysbox_register(lua_State* L){ + bphysbox_register(L); +} -- cgit v1.2.3-70-g09d2