mirror of
				https://github.com/OpenMW/openmw.git
				synced 2025-10-30 02:56:44 +00:00 
			
		
		
		
	Make Bullet DebugDrawer's default state match the physics system
This commit is contained in:
		
							parent
							
								
									8f2701c24b
								
							
						
					
					
						commit
						06d1e70aac
					
				
					 3 changed files with 5 additions and 7 deletions
				
			
		|  | @ -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() | ||||||
|  |  | ||||||
|  | @ -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() | ||||||
|  |  | ||||||
|  | @ -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(); | ||||||
|  |  | ||||||
		Loading…
	
		Reference in a new issue