Ctrl-S sound feature added

This commit is contained in:
Patrick Manalich 2017-06-01 17:57:18 -07:00
parent 0c71cf4bda
commit a705e722f1
3 changed files with 14 additions and 1 deletions

View file

@ -1683,6 +1683,9 @@ Application::~Application() {
_physicsEngine->setCharacterController(nullptr);
// shutdown render engine
_main3DScene = nullptr;
_renderEngine = nullptr;
// the _shapeManager should have zero references
_shapeManager.collectGarbage();
assert(_shapeManager.getNumShapes() == 0);
@ -4494,7 +4497,17 @@ void Application::update(float deltaTime) {
getEntities()->getTree()->withWriteLock([&] {
PerformanceTimer perfTimer("handleOutgoingChanges");
const VectorOfMotionStates& deactivations = _physicsEngine->getDeactivatedMotionStates();
_entitySimulation->handleDeactivatedMotionStates(deactivations);
getEntities()->getTree()->withWriteLock([&] {
PerformanceTimer perfTimer("handleOutgoingChanges");
const VectorOfMotionStates& outgoingChanges = _physicsEngine->getChangedMotionStates();
_entitySimulation->handleChangedMotionStates(outgoingChanges);
avatarManager->handleChangedMotionStates(outgoingChanges);
});
const VectorOfMotionStates& outgoingChanges = _physicsEngine->getChangedMotionStates();
_entitySimulation->handleChangedMotionStates(outgoingChanges);
avatarManager->handleChangedMotionStates(outgoingChanges);

View file

@ -410,7 +410,7 @@ function takeSnapshot() {
Menu.setIsOptionChecked("Overlays", false);
}
var snapActivateSound = SoundCache.getSound(Script.resolvePath("assets/sounds/snap.wav"));
var snapActivateSound = SoundCache.getSound(Script.resolvePath("../../resources/sounds/snap.wav"));
// take snapshot (with no notification)
Script.setTimeout(function () {