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/load_scene.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'src/client/lua_api/load_scene.cpp') diff --git a/src/client/lua_api/load_scene.cpp b/src/client/lua_api/load_scene.cpp index 285cba0..6d02a2d 100644 --- a/src/client/lua_api/load_scene.cpp +++ b/src/client/lua_api/load_scene.cpp @@ -11,7 +11,7 @@ extern "C" { #include "scene/icamera.hpp" #include "scene/imesh.hpp" #include "scene/ilight.hpp" -#include "phys/bphysbox.hpp" +#include "phys/cbphysbox.hpp" #include "phys/bphysmodel.hpp" using namespace irr; @@ -19,13 +19,16 @@ using namespace irr; extern IrrlichtDevice* device; void load_scenefuncs(lua_State* L){ + lua_newtable(L);//{} + lua_setglobal(L,"scene");// icamera_register(L,device); + imesh_register(L,device); ilight_register(L,device); - bphysbox_register(L,device); + lua_newtable(L); + lua_setglobal(L,"phys"); + cbphysbox_register(L); bphysmodel_register(L,device); - lua_pop(L, 1); + //lua_pop(L, 1); - lua_newtable(L); - lua_setglobal(L,"scene"); } -- cgit v1.2.3-70-g09d2