aboutsummaryrefslogtreecommitdiff
path: root/src/shared/lua_api/phys/bphysbox.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/shared/lua_api/phys/bphysbox.cpp')
-rw-r--r--src/shared/lua_api/phys/bphysbox.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/shared/lua_api/phys/bphysbox.cpp b/src/shared/lua_api/phys/bphysbox.cpp
index 4564c6e..569f3f9 100644
--- a/src/shared/lua_api/phys/bphysbox.cpp
+++ b/src/shared/lua_api/phys/bphysbox.cpp
@@ -9,6 +9,7 @@ extern "C" {
}
#include <btBulletDynamicsCommon.h>
#include "bphysbox.hpp"
+#include "bphysgeneric.hpp"
#include <shared/lua_api/common.hpp>
extern btDiscreteDynamicsWorld* World;
@@ -40,7 +41,7 @@ void makenewbphysbox(lua_State* L){
//printf("Got position: (%f,%f,%f)\n",px,py,pz);
popvector3d(L,&sx,&sy,&sz);//
- btVector3 vshape = btVector3(sx * 0.5f, sy * 0.5f, sz * 0.5f);
+ btVector3 vshape = btVector3(sx, sy, sz);
//printf("Got size: (%f,%f,%f)\n",sx,sy,sz);
btVector3 pos = btVector3(px,py,pz);
@@ -168,6 +169,7 @@ void bphysbox_register(lua_State* L){//
luaL_newmetatable(L, "phys.physbox");//{phys.physbox}
lua_newtable(L);//{phys.physbox},{}
luaL_register(L,NULL,bphysbox_m);//{phys.physbox},{}
+ luaL_register(L,NULL,brigidbody_m);
lua_setfield(L,-2,"__index");//{phys.physbox}
lua_pop(L,1);//