From 526159f961efb6302fca1c3a8204cc6552558bfe Mon Sep 17 00:00:00 2001 From: enn0x Date: Fri, 28 Sep 2012 20:20:05 +0000 Subject: [PATCH] A few asserts for better error localisation. --- panda/src/bullet/bulletWorld.cxx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/panda/src/bullet/bulletWorld.cxx b/panda/src/bullet/bulletWorld.cxx index c7e98914fb..a02ff90754 100644 --- a/panda/src/bullet/bulletWorld.cxx +++ b/panda/src/bullet/bulletWorld.cxx @@ -65,12 +65,15 @@ BulletWorld() { default: bullet_cat.error() << "no proper broadphase algorithm!" << endl; } + nassertv(_broadphase); // Configuration _configuration = new btSoftBodyRigidBodyCollisionConfiguration(); + nassertv(_configuration); // Dispatcher _dispatcher = new btCollisionDispatcher(_configuration); + nassertv(_dispatcher); /* _dispatcher.registerCollisionCreateFunc( @@ -97,9 +100,13 @@ BulletWorld() { // Solver _solver = new btSequentialImpulseConstraintSolver; + nassertv(_solver); // World _world = new btSoftRigidDynamicsWorld(_dispatcher, _broadphase, _solver, _configuration); + nassertv(_world); + nassertv(_world->getPairCache()); + _world->setGravity(btVector3(0.0f, 0.0f, 0.0f)); // Ghost-pair callback