aboutsummaryrefslogtreecommitdiff
path: root/src/shared/lua_api/load_phys.cpp
diff options
context:
space:
mode:
authorAlexander <alex@cogarr.net>2019-04-24 21:16:08 -0400
committerAlexander <alex@cogarr.net>2019-04-24 21:16:08 -0400
commit3d60e1432ec43ade4aa61b5a70dd6b8975417e9f (patch)
tree954719a0f4a27fe42f9d8113844a21b79ae70f5d /src/shared/lua_api/load_phys.cpp
parent42bedce123739287339a95626675ffda3a1ce8e7 (diff)
downloadbrokengine-3d60e1432ec43ade4aa61b5a70dd6b8975417e9f.tar.gz
brokengine-3d60e1432ec43ade4aa61b5a70dd6b8975417e9f.tar.bz2
brokengine-3d60e1432ec43ade4aa61b5a70dd6b8975417e9f.zip
updates
Diffstat (limited to 'src/shared/lua_api/load_phys.cpp')
-rw-r--r--src/shared/lua_api/load_phys.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/shared/lua_api/load_phys.cpp b/src/shared/lua_api/load_phys.cpp
index db35f37..be5529c 100644
--- a/src/shared/lua_api/load_phys.cpp
+++ b/src/shared/lua_api/load_phys.cpp
@@ -1,17 +1,21 @@
#include "load_phys.hpp"
#include "phys/bphysbox.hpp"
#include "phys/bhingeconstraint.hpp"
+#include "phys/bcharactercontroller.hpp"
#include <btBulletDynamicsCommon.h>
#include <shared/lua_api/common.hpp>
void load_physfuncs(lua_State* L){
lua_newtable(L);//{}
lua_setglobal(L,"phys");//
- lua_getglobal(L,"phys");
+ lua_getglobal(L,"phys");//{phys}
+ lua_newtable(L);//{phys},{}
+ lua_setfield(L,-2,"colliders");//{phys}
set_const(L,BT_DISABLE_WORLD_GRAVITY);
set_const(L,BT_ENABLE_GYROSCOPIC_FORCE_EXPLICIT);
set_const(L,BT_ENABLE_GYROSCOPIC_FORCE_IMPLICIT_WORLD);
set_const(L,BT_ENABLE_GYROSCOPIC_FORCE_IMPLICIT_BODY);
bphysbox_register(L);
bhingeconstraint_register(L);
+ bcharactercontroller_register(L);
}