History

Merge branch 'master' of https://github.com/highfidelity/hifi into remove-global-collision-and-update-examples

Howard Stearns committed 11 years ago

Commit 3c718af2 parents de44c56 92c55d631 files · +584 −258Browse files

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

Unified · Split

interface/src/Application.cpp+14−1
@@ -687,6 +687,10 @@ Application::~Application() { · 686 unmodified lines
687 // stop the glWidget frame timer so it doesn't call paintGL687 // stop the glWidget frame timer so it doesn't call paintGL
688 _glWidget->stopFrameTimer();688 _glWidget->stopFrameTimer();
689 689
690 // remove avatars from physics engine
691 DependencyManager::get<AvatarManager>()->clearOtherAvatars();
692 _physicsEngine.deleteObjects(DependencyManager::get<AvatarManager>()->getObjectsToDelete());
693
690 DependencyManager::destroy<OffscreenUi>();694 DependencyManager::destroy<OffscreenUi>();
691 DependencyManager::destroy<AvatarManager>();695 DependencyManager::destroy<AvatarManager>();
692 DependencyManager::destroy<AnimationCache>();696 DependencyManager::destroy<AnimationCache>();
@@ -2150,7 +2154,7 @@ void Application::init() { · 1457 unmodified lines
2150 _physicsEngine.init();2154 _physicsEngine.init();
2151 2155
2152 EntityTree* tree = _entities.getTree();2156 EntityTree* tree = _entities.getTree();
2153 _entitySimulation.init(tree, &_physicsEngine, &_shapeManager, &_entityEditSender);2157 _entitySimulation.init(tree, &_physicsEngine, &_entityEditSender);
2154 tree->setSimulation(&_entitySimulation);2158 tree->setSimulation(&_entitySimulation);
2155 2159
2156 auto entityScriptingInterface = DependencyManager::get<EntityScriptingInterface>();2160 auto entityScriptingInterface = DependencyManager::get<EntityScriptingInterface>();
@@ -2467,12 +2471,21 @@ void Application::update(float deltaTime) { · 310 unmodified lines
2467 _physicsEngine.changeObjects(_entitySimulation.getObjectsToChange());2471 _physicsEngine.changeObjects(_entitySimulation.getObjectsToChange());
2468 _entitySimulation.unlock();2472 _entitySimulation.unlock();
2469 2473
2474 AvatarManager* avatarManager = DependencyManager::get<AvatarManager>().data();
2475 _physicsEngine.deleteObjects(avatarManager->getObjectsToDelete());
2476 _physicsEngine.addObjects(avatarManager->getObjectsToAdd());
2477 _physicsEngine.changeObjects(avatarManager->getObjectsToChange());
2478
2470 _physicsEngine.stepSimulation();2479 _physicsEngine.stepSimulation();
2471 2480
2472 if (_physicsEngine.hasOutgoingChanges()) {2481 if (_physicsEngine.hasOutgoingChanges()) {
2473 _entitySimulation.lock();2482 _entitySimulation.lock();
2474 _entitySimulation.handleOutgoingChanges(_physicsEngine.getOutgoingChanges(), _physicsEngine.getSessionID());2483 _entitySimulation.handleOutgoingChanges(_physicsEngine.getOutgoingChanges(), _physicsEngine.getSessionID());
2475 _entitySimulation.unlock();2484 _entitySimulation.unlock();
2485
2486 avatarManager->handleOutgoingChanges(_physicsEngine.getOutgoingChanges());
2487 avatarManager->handleCollisionEvents(_physicsEngine.getCollisionEvents());
2488
2476 _physicsEngine.dumpStatsIfNecessary();2489 _physicsEngine.dumpStatsIfNecessary();
2477 }2490 }
2478 }2491 }

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