Showing the changes to interface/src/Application.cpp (1 of 107 files). Show all
Unified · Split
| @@ -130,7 +130,7 @@ static QTimer* idleTimer = NULL; · 129 unmodified lines | ||
| 130 | 130 | const QString CHECK_VERSION_URL = "https://highfidelity.io/latestVersion.xml"; |
| 131 | 131 | const QString SKIP_FILENAME = QStandardPaths::writableLocation(QStandardPaths::DataLocation) + "/hifi.skipversion"; |
| 132 | 132 | |
| 133 | −const QString DEFAULT_SCRIPTS_JS_URL = "http://public.highfidelity.io/scripts/defaultScripts.js"; | |
| 133 | +const QString DEFAULT_SCRIPTS_JS_URL = "http://s3.amazonaws.com/hifi-public/scripts/defaultScripts.js"; | |
| 134 | 134 | |
| 135 | 135 | void messageHandler(QtMsgType type, const QMessageLogContext& context, const QString& message) { |
| 136 | 136 | QString logMessage = LogHandler::getInstance().printMessage((LogMsgType) type, context, message); |
| @@ -310,13 +310,6 @@ Application::Application(int& argc, char** argv, QElapsedTimer &startup_time) : · 173 unmodified lines | ||
| 310 | 310 | // use our MyAvatar position and quat for address manager path |
| 311 | 311 | addressManager.setPositionGetter(getPositionForPath); |
| 312 | 312 | addressManager.setOrientationGetter(getOrientationForPath); |
| 313 | − | |
| 314 | − // handle domain change signals from AddressManager | |
| 315 | − connect(&addressManager, &AddressManager::possibleDomainChangeRequiredToHostname, | |
| 316 | − this, &Application::changeDomainHostname); | |
| 317 | − | |
| 318 | − connect(&addressManager, &AddressManager::possibleDomainChangeRequiredViaICEForID, | |
| 319 | − &domainHandler, &DomainHandler::setIceServerHostnameAndID); | |
| 320 | 313 | |
| 321 | 314 | _settings = new QSettings(this); |
| 322 | 315 | _numChangedSettings = 0; |
| @@ -538,8 +531,6 @@ void Application::initializeGL() { · 215 unmodified lines | ||
| 538 | 531 | } else { |
| 539 | 532 | isInitialized = true; |
| 540 | 533 | } |
| 541 | − int argc = 0; | |
| 542 | − glutInit(&argc, 0); | |
| 543 | 534 | #endif |
| 544 | 535 | |
| 545 | 536 | #ifdef WIN32 |
| @@ -1436,7 +1427,7 @@ void Application::dropEvent(QDropEvent *event) { · 890 unmodified lines | ||
| 1436 | 1427 | SnapshotMetaData* snapshotData = Snapshot::parseSnapshotData(snapshotPath); |
| 1437 | 1428 | if (snapshotData) { |
| 1438 | 1429 | if (!snapshotData->getDomain().isEmpty()) { |
| 1439 | − changeDomainHostname(snapshotData->getDomain()); | |
| 1430 | + DependencyManager::get<NodeList>()->getDomainHandler().setHostnameAndPort(snapshotData->getDomain()); | |
| 1440 | 1431 | } |
| 1441 | 1432 | |
| 1442 | 1433 | _myAvatar->setPosition(snapshotData->getLocation()); |
| @@ -3577,7 +3568,7 @@ void Application::renderViewFrustum(ViewFrustum& viewFrustum) { · 2134 unmodified lines | ||
| 3577 | 3568 | glPushMatrix(); |
| 3578 | 3569 | glColor4f(1, 1, 0, 1); |
| 3579 | 3570 | glTranslatef(position.x, position.y, position.z); // where we actually want it! |
| 3580 | − glutWireSphere(keyholeRadius, 20, 20); | |
| 3571 | + DependencyManager::get<GeometryCache>()->renderSphere(keyholeRadius, 20, 20, false); | |
| 3581 | 3572 | glPopMatrix(); |
| 3582 | 3573 | } |
| 3583 | 3574 | } |
| @@ -3701,19 +3692,6 @@ void Application::updateLocationInServer() { · 117 unmodified lines | ||
| 3701 | 3692 | } |
| 3702 | 3693 | } |
| 3703 | 3694 | |
| 3704 | −void Application::changeDomainHostname(const QString &newDomainHostname) { | |
| 3705 | − auto nodeList = DependencyManager::get<NodeList>(); | |
| 3706 | − | |
| 3707 | − if (!nodeList->getDomainHandler().isCurrentHostname(newDomainHostname)) { | |
| 3708 | − // tell the MyAvatar object to send a kill packet so that it dissapears from its old avatar mixer immediately | |
| 3709 | − _myAvatar->sendKillAvatar(); | |
| 3710 | − | |
| 3711 | − // call the domain hostname change as a queued connection on the nodelist | |
| 3712 | − QMetaObject::invokeMethod(&DependencyManager::get<NodeList>()->getDomainHandler(), "setHostname", | |
| 3713 | − Q_ARG(const QString&, newDomainHostname)); | |
| 3714 | − } | |
| 3715 | −} | |
| 3716 | − | |
| 3717 | 3695 | void Application::clearDomainOctreeDetails() { |
| 3718 | 3696 | qDebug() << "Clearing domain octree details..."; |
| 3719 | 3697 | // reset the environment so that we don't erroneously end up with multiple |