[Orxonox-commit 5656] r10316 - code/trunk/src/orxonox
smerkli at orxonox.net
smerkli at orxonox.net
Sun Mar 15 15:22:18 CET 2015
Author: smerkli
Date: 2015-03-15 15:22:18 +0100 (Sun, 15 Mar 2015)
New Revision: 10316
Modified:
code/trunk/src/orxonox/Scene.cc
Log:
only load debug drawer if graphics is enabled
Modified: code/trunk/src/orxonox/Scene.cc
===================================================================
--- code/trunk/src/orxonox/Scene.cc 2015-03-12 14:56:09 UTC (rev 10315)
+++ code/trunk/src/orxonox/Scene.cc 2015-03-15 14:22:18 UTC (rev 10316)
@@ -204,8 +204,11 @@
this->physicalWorld_ = new btDiscreteDynamicsWorld(this->dispatcher_, this->broadphase_, this->solver_, this->collisionConfig_);
this->physicalWorld_->setGravity(multi_cast<btVector3>(this->gravity_));
- this->debugDrawer_ = new BulletDebugDrawer(this->sceneManager_);
- this->physicalWorld_->setDebugDrawer(this->debugDrawer_);
+ if (GameMode::showsGraphics() && this->sceneManager_)
+ {
+ this->debugDrawer_ = new BulletDebugDrawer(this->sceneManager_);
+ this->physicalWorld_->setDebugDrawer(this->debugDrawer_);
+ }
// also set the collision callback variable.
// Note: This is a global variable which we assign a static function.
More information about the Orxonox-commit
mailing list