diff options
| author | Alexander Pickering <alexandermpickering@gmail.com> | 2018-06-22 12:38:38 -0600 |
|---|---|---|
| committer | Alexander Pickering <alexandermpickering@gmail.com> | 2018-06-22 12:38:38 -0600 |
| commit | 9fa5dcc9310a8c6ff8c77a47a86303f7b950dcf3 (patch) | |
| tree | d7956fc8aabef903f354578d69d4d7fdf64ec928 /src/shared/lua_api | |
| parent | 06d3e8182d018ca613f177f6ff7a3bbb6494cc79 (diff) | |
| download | brokengine-9fa5dcc9310a8c6ff8c77a47a86303f7b950dcf3.tar.gz brokengine-9fa5dcc9310a8c6ff8c77a47a86303f7b950dcf3.tar.bz2 brokengine-9fa5dcc9310a8c6ff8c77a47a86303f7b950dcf3.zip | |
Updated core
Updated all core files to prepare for tech demo
Diffstat (limited to 'src/shared/lua_api')
| -rw-r--r-- | src/shared/lua_api/phys/bphysbox.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/shared/lua_api/phys/bphysbox.cpp b/src/shared/lua_api/phys/bphysbox.cpp index 78f1c45..0fe9f72 100644 --- a/src/shared/lua_api/phys/bphysbox.cpp +++ b/src/shared/lua_api/phys/bphysbox.cpp @@ -34,14 +34,14 @@ void makenewbphysbox(lua_State* L){ mass = lua_tonumber(L,-1);//{v3_size},{v3_origin},mass lua_pop(L,1);//{v3_size},{v3_origin} - printf("Got mass: %f\n",mass); + //printf("Got mass: %f\n",mass); popvector3d(L,&px,&py,&pz);//{v3_size} - printf("Got position: (%f,%f,%f)\n",px,py,pz); + //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); - printf("Got size: (%f,%f,%f)\n",sx,sy,sz); + //printf("Got size: (%f,%f,%f)\n",sx,sy,sz); btVector3 pos = btVector3(px,py,pz); // Set the initial position of the object @@ -52,12 +52,12 @@ void makenewbphysbox(lua_State* L){ // Give it a default MotionState btDefaultMotionState* motionstate = new btDefaultMotionState(transform); if(!motionstate){ - printf("No motionstate\n"); + //printf("No motionstate\n"); } // Create the shape btCollisionShape* shape = new btBoxShape(vshape); if(!shape){ - printf("no shape\n"); + //printf("no shape\n"); } // Add mass @@ -67,12 +67,12 @@ void makenewbphysbox(lua_State* L){ // Create the rigid body object btRigidBody* rigidbody = new btRigidBody(mass, motionstate, shape, localinertia); if(!rigidbody){ - printf("No rigidbody\n"); + //printf("No rigidbody\n"); } // Add it to the world World->addRigidBody(rigidbody); - printf("Added rigid body to world: %p\n",World); + //printf("Added rigid body to world: %p\n",World); Objects.push_back(rigidbody); lua_pushlightuserdata(L,rigidbody);//ud_rigidbody @@ -80,7 +80,7 @@ void makenewbphysbox(lua_State* L){ // phys.newphysbox(vector3 size, vector3 origin, double mass) int newbphysbox(lua_State* L){ - printf("Createing bphysbox!\n"); + //printf("Createing bphysbox!\n"); //Create it's lua representation makenewbphysbox(L);//ud_btRigidBody btRigidBody* r = (btRigidBody*)lua_touserdata(L,-1); @@ -98,7 +98,7 @@ int newbphysbox(lua_State* L){ //{phys.physbox}:delete() static int delbphysbox(lua_State* L){//self - printf("Attempting to delete physbox\n"); + //printf("Attempting to delete physbox\n"); lua_getfield(L,-1,"rigidbody");//self,ud_rigidbody btRigidBody* r = (btRigidBody*)lua_touserdata(L,-1);//self,ud_rigidbody delete r->getCollisionShape(); @@ -130,7 +130,7 @@ static int bphyssetpos(lua_State *L){//self,{v3 pos} // {v3 pos} :: physbox:getpos() static int bphysgetpos(lua_State *L){//self - printf("Physics box set pos called\n"); + //printf("Physics box set pos called\n"); lua_getfield(L,-1,"rigidbody");//self,ud_rigidbody btRigidBody* i = (btRigidBody*)lua_touserdata(L,-1);//self,ud_rigidbody btTransform bt = i->getWorldTransform(); @@ -149,7 +149,7 @@ static const luaL_reg bphysbox_m[] = { }; void bphysbox_register(lua_State* L){// - printf("Registered bphysbox\n"); + //printf("Registered bphysbox\n"); luaL_newmetatable(L, "phys.physbox");//{phys.physbox} lua_newtable(L);//{phys.physbox},{} |
