1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-19 23:23:52 +00:00

Merge branch 'no-dynamic' into 'master'

Make Bullet DebugDrawer's default state match the physics system

See merge request OpenMW/openmw!418
This commit is contained in:
psi29a 2020-11-18 18:10:31 +00:00
commit 881bc49e0b
3 changed files with 5 additions and 7 deletions

View file

@ -93,7 +93,7 @@ namespace MWPhysics
} }
mTaskScheduler = std::make_unique<PhysicsTaskScheduler>(mPhysicsDt, mCollisionWorld); mTaskScheduler = std::make_unique<PhysicsTaskScheduler>(mPhysicsDt, mCollisionWorld);
mDebugDrawer = std::make_unique<MWRender::DebugDrawer>(mParentNode, mCollisionWorld.get()); mDebugDrawer = std::make_unique<MWRender::DebugDrawer>(mParentNode, mCollisionWorld.get(), mDebugDrawEnabled);
} }
PhysicsSystem::~PhysicsSystem() PhysicsSystem::~PhysicsSystem()

View file

@ -14,13 +14,11 @@
namespace MWRender namespace MWRender
{ {
DebugDrawer::DebugDrawer(osg::ref_ptr<osg::Group> parentNode, btCollisionWorld *world) DebugDrawer::DebugDrawer(osg::ref_ptr<osg::Group> parentNode, btCollisionWorld *world, int debugMode)
: mParentNode(parentNode), : mParentNode(parentNode),
mWorld(world), mWorld(world)
mDebugOn(true)
{ {
setDebugMode(debugMode);
createGeometry();
} }
void DebugDrawer::createGeometry() void DebugDrawer::createGeometry()

View file

@ -48,7 +48,7 @@ protected:
public: public:
DebugDrawer(osg::ref_ptr<osg::Group> parentNode, btCollisionWorld *world); DebugDrawer(osg::ref_ptr<osg::Group> parentNode, btCollisionWorld *world, int debugMode = 1);
~DebugDrawer(); ~DebugDrawer();
void step(); void step();