1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-31 23:15:41 +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);
mDebugDrawer = std::make_unique<MWRender::DebugDrawer>(mParentNode, mCollisionWorld.get());
mDebugDrawer = std::make_unique<MWRender::DebugDrawer>(mParentNode, mCollisionWorld.get(), mDebugDrawEnabled);
}
PhysicsSystem::~PhysicsSystem()

View file

@ -14,13 +14,11 @@
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),
mWorld(world),
mDebugOn(true)
mWorld(world)
{
createGeometry();
setDebugMode(debugMode);
}
void DebugDrawer::createGeometry()

View file

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