History

Merge remote-tracking branch 'upstream/master' into plugins

Brad Davis committed 11 years ago

Commit 27587182 parents 912c003 118444638 files · +1519 −920Browse files

Showing the changes to interface/src/Application.cpp (1 of 38 files). Show all

Unified · Split

interface/src/Application.cpp+14−10
@@ -2124,6 +2124,9 @@ void Application::init() { · 2123 unmodified lines
21242124 // initialize the GlowEffect with our widget
21252125 bool glow = Menu::getInstance()->isOptionChecked(MenuOption::EnableGlowEffect);
21262126 DependencyManager::get<GlowEffect>()->init(glow);
2127+
2128+ // Make sure any new sounds are loaded as soon as know about them.
2129+ connect(tree, &EntityTree::newCollisionSoundURL, DependencyManager::get<SoundCache>().data(), &SoundCache::getSound);
21272130 }
21282131
21292132 void Application::closeMirrorView() {
@@ -2427,19 +2430,20 @@ void Application::update(float deltaTime) { · 297 unmodified lines
24272430 _entitySimulation.unlock();
24282431
24292432 avatarManager->handleOutgoingChanges(_physicsEngine.getOutgoingChanges());
2430− avatarManager->handleCollisionEvents(_physicsEngine.getCollisionEvents());
2433+ auto collisionEvents = _physicsEngine.getCollisionEvents();
2434+ avatarManager->handleCollisionEvents(collisionEvents);
24312435
24322436 _physicsEngine.dumpStatsIfNecessary();
2433− }
2434− }
24352437
2436− if (!_aboutToQuit) {
2437− PerformanceTimer perfTimer("entities");
2438− // Collision events (and their scripts) must not be handled when we're locked, above. (That would risk deadlock.)
2439− _entitySimulation.handleCollisionEvents(_physicsEngine.getCollisionEvents());
2440− // NOTE: the _entities.update() call below will wait for lock
2441− // and will simulate entity motion (the EntityTree has been given an EntitySimulation).
2442− _entities.update(); // update the models...
2438+ if (!_aboutToQuit) {
2439+ PerformanceTimer perfTimer("entities");
2440+ // Collision events (and their scripts) must not be handled when we're locked, above. (That would risk deadlock.)
2441+ _entitySimulation.handleCollisionEvents(collisionEvents);
2442+ // NOTE: the _entities.update() call below will wait for lock
2443+ // and will simulate entity motion (the EntityTree has been given an EntitySimulation).
2444+ _entities.update(); // update the models...
2445+ }
2446+ }
24432447 }
24442448
24452449 {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t