send a hopeful disconnect packet from ACs and Interface
Showing the changes to interface/src/Application.cpp (1 of 16 files). Show all
Unified · Split
| @@ -804,8 +804,11 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer) : · 803 unmodified lines | ||
| 804 | 804 | |
| 805 | 805 | void Application::aboutToQuit() { |
| 806 | 806 | emit beforeAboutToQuit(); |
| 807 | + | |
| 807 | 808 | getActiveDisplayPlugin()->deactivate(); |
| 809 | + | |
| 808 | 810 | _aboutToQuit = true; |
| 811 | + | |
| 809 | 812 | cleanupBeforeQuit(); |
| 810 | 813 | } |
| 811 | 814 | |
| @@ -831,8 +834,14 @@ void Application::cleanupBeforeQuit() { · 19 unmodified lines | ||
| 831 | 834 | |
| 832 | 835 | _entities.clear(); // this will allow entity scripts to properly shutdown |
| 833 | 836 | |
| 837 | + auto nodeList = DependencyManager::get<NodeList>(); | |
| 838 | + | |
| 839 | + // send the domain a disconnect packet, force stoppage of domain-server check-ins | |
| 840 | + nodeList->getDomainHandler().disconnect(); | |
| 841 | + nodeList->setIsShuttingDown(true); | |
| 842 | + | |
| 834 | 843 | // tell the packet receiver we're shutting down, so it can drop packets |
| 835 | − DependencyManager::get<NodeList>()->getPacketReceiver().setShouldDropPackets(true); | |
| 844 | + nodeList->getPacketReceiver().setShouldDropPackets(true); | |
| 836 | 845 | |
| 837 | 846 | _entities.shutdown(); // tell the entities system we're shutting down, so it will stop running scripts |
| 838 | 847 | ScriptEngine::stopAllScripts(this); // stop all currently running global scripts |
| @@ -852,9 +861,6 @@ void Application::cleanupBeforeQuit() { · 13 unmodified lines | ||
| 852 | 861 | saveSettings(); |
| 853 | 862 | _window->saveGeometry(); |
| 854 | 863 | |
| 855 | − // let the avatar mixer know we're out | |
| 856 | − MyAvatar::sendKillAvatar(); | |
| 857 | − | |
| 858 | 864 | // stop the AudioClient |
| 859 | 865 | QMetaObject::invokeMethod(DependencyManager::get<AudioClient>().data(), |
| 860 | 866 | "stop", Qt::BlockingQueuedConnection); |