Since the bucky balls are showing up in the hot spots list when profiling,

don't simulate them if they're disabled.
This commit is contained in:
Andrzej Kapolka 2014-03-11 17:16:49 -07:00
parent 5bfe2c2ed5
commit bf9929e64d

View file

@ -1241,8 +1241,10 @@ void Application::idle() {
_idleLoopStdev.reset();
}
_buckyBalls.simulate(timeSinceLastUpdate / 1000.f, Application::getInstance()->getAvatar()->getHandData());
if (Menu::getInstance()->isOptionChecked(MenuOption::BuckyBalls)) {
_buckyBalls.simulate(timeSinceLastUpdate / 1000.f, Application::getInstance()->getAvatar()->getHandData());
}
// After finishing all of the above work, restart the idle timer, allowing 2ms to process events.
idleTimer->start(2);
}