History

Merge branch 'master' of https://github.com/worklist/hifi

Andrzej Kapolka committed 13 years ago

Commit 63aeb4d2 parents bd3c235 426abbb26 files · +680 −146Browse files

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

Unified · Split

interface/src/Application.cpp+233−76
@@ -234,6 +234,10 @@ Application::Application(int& argc, char** argv, timeval &startup_time) : · 233 unmodified lines
234234
235235 NodeList::createInstance(NODE_TYPE_AGENT, listenPort);
236236
237+ NodeList::getInstance()->addHook(&_voxels);
238+ NodeList::getInstance()->addHook(this);
239+
240+
237241 _enableNetworkThread = !cmdOptionExists(argc, constArgv, "--nonblocking");
238242 if (!_enableNetworkThread) {
239243 NodeList::getInstance()->getNodeSocket()->setBlocking(false);
@@ -317,6 +321,11 @@ Application::Application(int& argc, char** argv, timeval &startup_time) : · 77 unmodified lines
317321 // initialization continues in initializeGL when OpenGL context is ready
318322 }
319323
324+Application::~Application() {
325+ NodeList::getInstance()->removeHook(&_voxels);
326+ NodeList::getInstance()->removeHook(this);
327+}
328+
320329 void Application::initializeGL() {
321330 qDebug( "Created Display Window.\n" );
322331
@@ -1290,9 +1299,9 @@ void Application::editPreferences() { · 967 unmodified lines
12901299 horizontalFieldOfView->setValue(_horizontalFieldOfView);
12911300 form->addRow("Horizontal field of view (degrees):", horizontalFieldOfView);
12921301
1293− QDoubleSpinBox* headCameraPitchYawScale = new QDoubleSpinBox();
1294− headCameraPitchYawScale->setValue(_headCameraPitchYawScale);
1295− form->addRow("Head Camera Pitch/Yaw Scale:", headCameraPitchYawScale);
1302+ QDoubleSpinBox* gyroCameraSensitivity = new QDoubleSpinBox();
1303+ gyroCameraSensitivity->setValue(_gyroCameraSensitivity);
1304+ form->addRow("Gyro Camera Sensitivity (0 - 1):", gyroCameraSensitivity);
12961305
12971306 QDoubleSpinBox* leanScale = new QDoubleSpinBox();
12981307 leanScale->setValue(_myAvatar.getLeanScale());
@@ -1342,7 +1351,7 @@ void Application::editPreferences() { · 43 unmodified lines
13421351 _myAvatar.getVoxels()->setVoxelURL(url);
13431352 sendAvatarVoxelURLMessage(url);
13441353
1345− _headCameraPitchYawScale = headCameraPitchYawScale->value();
1354+ _gyroCameraSensitivity = gyroCameraSensitivity->value();
13461355 _myAvatar.setLeanScale(leanScale->value());
13471356 _audioJitterBufferSamples = audioJitterBufferSamples->value();
13481357 if (!shouldDynamicallySetJitterBuffer()) {
@@ -1944,6 +1953,7 @@ void Application::initMenu() { · 595 unmodified lines
19441953 (_fullScreenMode = optionsMenu->addAction("Fullscreen", this, SLOT(setFullscreen(bool)), Qt::Key_F))->setCheckable(true);
19451954 optionsMenu->addAction("Webcam", &_webcam, SLOT(setEnabled(bool)))->setCheckable(true);
19461955 optionsMenu->addAction("Skeleton Tracking", &_webcam, SLOT(setSkeletonTrackingOn(bool)))->setCheckable(true);
1956+ (_wantCollisionsOn = optionsMenu->addAction("Turn collisions On", this, SLOT(toggleWantCollisionsOn())))->setCheckable(true);
19471957 optionsMenu->addAction("Cycle Webcam Send Mode", _webcam.getGrabber(), SLOT(cycleVideoSendMode()));
19481958 optionsMenu->addAction("Webcam Texture", _webcam.getGrabber(), SLOT(setDepthOnly(bool)))->setCheckable(true);
19491959 optionsMenu->addAction("Go Home", this, SLOT(goHome()), Qt::CTRL | Qt::Key_G);
@@ -2138,6 +2148,10 @@ void Application::toggleMixedSong() { · 188 unmodified lines
21382148 }
21392149 }
21402150
2151+void Application::toggleWantCollisionsOn() {
2152+ _myAvatar.setWantCollisionsOn(_wantCollisionsOn->isChecked());
2153+}
2154+
21412155 void Application::resetSongMixMenuItem() {
21422156 if (_audio.getSongFileBytes() == 0) {
21432157 _rawAudioMicrophoneMix->setText("Mix RAW Song");
@@ -2288,6 +2302,56 @@ void Application::renderLookatIndicator(glm::vec3 pointOfInterest, Camera& which · 144 unmodified lines
22882302 renderCircle(haloOrigin, INDICATOR_RADIUS, IDENTITY_UP, NUM_SEGMENTS);
22892303 }
22902304
2305+void Application::renderFollowIndicator() {
2306+ NodeList* nodeList = NodeList::getInstance();
2307+
2308+ glLineWidth(5);
2309+ glBegin(GL_LINES);
2310+ for (NodeList::iterator node = nodeList->begin(); node != nodeList->end(); ++node) {
2311+ if (node->getLinkedData() != NULL && node->getType() == NODE_TYPE_AGENT) {
2312+ Avatar* avatar = (Avatar *) node->getLinkedData();
2313+ Avatar* leader = NULL;
2314+
2315+ if (avatar->getLeaderID() != UNKNOWN_NODE_ID) {
2316+ if (avatar->getLeaderID() == NodeList::getInstance()->getOwnerID()) {
2317+ leader = &_myAvatar;
2318+ } else {
2319+ for (NodeList::iterator it = nodeList->begin(); it != nodeList->end(); ++it) {
2320+ if(it->getNodeID() == avatar->getLeaderID()
2321+ && it->getType() == NODE_TYPE_AGENT) {
2322+ leader = (Avatar*) it->getLinkedData();
2323+ }
2324+ }
2325+ }
2326+
2327+ if (leader != NULL) {
2328+ glColor3f(1.f, 0.f, 0.f);
2329+ glVertex3f(avatar->getPosition().x,
2330+ avatar->getPosition().y,
2331+ avatar->getPosition().z);
2332+ glColor3f(0.f, 1.f, 0.f);
2333+ glVertex3f(leader->getPosition().x,
2334+ leader->getPosition().y,
2335+ leader->getPosition().z);
2336+ }
2337+ }
2338+ }
2339+ }
2340+
2341+ if (_myAvatar.getLeadingAvatar() != NULL) {
2342+ glColor3f(1.f, 0.f, 0.f);
2343+ glVertex3f(_myAvatar.getPosition().x,
2344+ _myAvatar.getPosition().y,
2345+ _myAvatar.getPosition().z);
2346+ glColor3f(0.f, 1.f, 0.f);
2347+ glVertex3f(_myAvatar.getLeadingAvatar()->getPosition().x,
2348+ _myAvatar.getLeadingAvatar()->getPosition().y,
2349+ _myAvatar.getLeadingAvatar()->getPosition().z);
2350+ }
2351+
2352+ glEnd();
2353+}
2354+
22912355 void Application::update(float deltaTime) {
22922356
22932357 // Use Transmitter Hand to move hand if connected, else use mouse
@@ -2501,7 +2565,7 @@ void Application::update(float deltaTime) { · 207 unmodified lines
25012565 if (!avatar->isInitialized()) {
25022566 avatar->init();
25032567 }
2504− avatar->simulate(deltaTime, NULL);
2568+ avatar->simulate(deltaTime, NULL, 0.f);
25052569 avatar->setMouseRay(mouseRayOrigin, mouseRayDirection);
25062570 }
25072571 node->unlock();
@@ -2516,9 +2580,9 @@ void Application::update(float deltaTime) { · 8 unmodified lines
25162580 }
25172581
25182582 if (_transmitterDrives->isChecked() && _myTransmitter.isConnected()) {
2519− _myAvatar.simulate(deltaTime, &_myTransmitter);
2583+ _myAvatar.simulate(deltaTime, &_myTransmitter, _gyroCameraSensitivity);
25202584 } else {
2521− _myAvatar.simulate(deltaTime, NULL);
2585+ _myAvatar.simulate(deltaTime, NULL, _gyroCameraSensitivity);
25222586 }
25232587
25242588 if (!OculusManager::isConnected()) {
@@ -2585,10 +2649,6 @@ void Application::updateAvatar(float deltaTime) { · 60 unmodified lines
25852649
25862650 // Update my avatar's state from gyros and/or webcam
25872651 _myAvatar.updateFromGyrosAndOrWebcam(_gyroLook->isChecked(),
2588− glm::vec3(_headCameraPitchYawScale,
2589− _headCameraPitchYawScale,
2590− _headCameraPitchYawScale),
2591− 0.f,
25922652 _pitchFromTouch);
25932653
25942654 if (_serialHeadSensor.isActive()) {
@@ -3014,6 +3074,8 @@ void Application::displaySide(Camera& whichCamera) { · 419 unmodified lines
30143074 glEnable(GL_LIGHTING);
30153075 }
30163076
3077+ _myAvatar.renderScreenTint(SCREEN_TINT_BEFORE_AVATARS);
3078+
30173079 if (_renderAvatarsOn->isChecked()) {
30183080 // Render avatars of other nodes
30193081 NodeList* nodeList = NodeList::getInstance();
@@ -3059,6 +3121,20 @@ void Application::displaySide(Camera& whichCamera) { · 39 unmodified lines
30593121
30603122 // brad's frustum for debugging
30613123 if (_frustumOn->isChecked()) renderViewFrustum(_viewFrustum);
3124+
3125+ // render voxel fades if they exist
3126+ if (_voxelFades.size() > 0) {
3127+ for(std::vector<VoxelFade>::iterator fade = _voxelFades.begin(); fade != _voxelFades.end();) {
3128+ fade->render();
3129+ if(fade->isDone()) {
3130+ fade = _voxelFades.erase(fade);
3131+ } else {
3132+ ++fade;
3133+ }
3134+ }
3135+ }
3136+
3137+ renderFollowIndicator();
30623138 }
30633139
30643140 void Application::displayOverlay() {
@@ -3626,6 +3702,62 @@ void Application::shiftPaintingColor() { · 561 unmodified lines
36263702 }
36273703
36283704
3705+void Application::injectVoxelAddedSoundEffect() {
3706+ AudioInjector* voxelInjector = AudioInjectionManager::injectorWithCapacity(11025);
3707+
3708+ if (voxelInjector) {
3709+ voxelInjector->setPosition(glm::vec3(_mouseVoxel.x, _mouseVoxel.y, _mouseVoxel.z));
3710+ //voxelInjector->setBearing(-1 * _myAvatar.getAbsoluteHeadYaw());
3711+ voxelInjector->setVolume (16 * pow (_mouseVoxel.s, 2) / .0000001); //255 is max, and also default value
3712+
3713+ /* for (int i = 0; i
3714+ < 22050; i++) {
3715+ if (i % 4 == 0) {
3716+ voxelInjector->addSample(4000);
3717+ } else if (i % 4 == 1) {
3718+ voxelInjector->addSample(0);
3719+ } else if (i % 4 == 2) {
3720+ voxelInjector->addSample(-4000);
3721+ } else {
3722+ voxelInjector->addSample(0);
3723+ }
3724+ */
3725+
3726+ const float BIG_VOXEL_MIN_SIZE = .01f;
3727+
3728+ for (int i = 0; i < 11025; i++) {
3729+
3730+ /*
3731+ A440 square wave
3732+ if (sin(i * 2 * PIE / 50)>=0) {
3733+ voxelInjector->addSample(4000);
3734+ } else {
3735+ voxelInjector->addSample(-4000);
3736+ }
3737+ */
3738+
3739+ if (_mouseVoxel.s > BIG_VOXEL_MIN_SIZE) {
3740+ voxelInjector->addSample(20000 * sin((i * 2 * PIE) / (500 * sin((i + 1) / 200))));
3741+ } else {
3742+ voxelInjector->addSample(16000 * sin(i / (1.5 * log (_mouseVoxel.s / .0001) * ((i + 11025) / 5512.5)))); //808
3743+ }
3744+ }
3745+
3746+ //voxelInjector->addSample(32500 * sin(i/(2 * 1 * ((i+5000)/5512.5)))); //80
3747+ //voxelInjector->addSample(20000 * sin(i/(6 * (_mouseVoxel.s/.001) *((i+5512.5)/5512.5)))); //808
3748+ //voxelInjector->addSample(20000 * sin(i/(6 * ((i+5512.5)/5512.5)))); //808
3749+ //voxelInjector->addSample(4000 * sin(i * 2 * PIE /50)); //A440 sine wave
3750+ //voxelInjector->addSample(4000 * sin(i * 2 * PIE /50) * sin (i/500)); //A440 sine wave with amplitude modulation
3751+
3752+ //FM library
3753+ //voxelInjector->addSample(20000 * sin((i * 2 * PIE) /(500*sin((i+1)/200)))); //FM 1 dubstep
3754+ //voxelInjector->addSample(20000 * sin((i * 2 * PIE) /(300*sin((i+1)/5.0)))); //FM 2 flange sweep
3755+ //voxelInjector->addSample(10000 * sin((i * 2 * PIE) /(500*sin((i+1)/500.0)))); //FM 3 resonant pulse
3756+
3757+ AudioInjectionManager::threadInjector(voxelInjector);
3758+ }
3759+}
3760+
36293761 bool Application::maybeEditVoxelUnderCursor() {
36303762 if (_addVoxelMode->isChecked() || _colorVoxelMode->isChecked()) {
36313763 if (_mouseVoxel.s != 0) {
@@ -3636,65 +3768,35 @@ bool Application::maybeEditVoxelUnderCursor() { · 4 unmodified lines
36363768 // create the voxel locally so it appears immediately
36373769 _voxels.createVoxel(_mouseVoxel.x, _mouseVoxel.y, _mouseVoxel.z, _mouseVoxel.s,
36383770 _mouseVoxel.red, _mouseVoxel.green, _mouseVoxel.blue, _destructiveAddVoxel->isChecked());
3771+
3772+ // Implement voxel fade effect
3773+ VoxelFade fade(VoxelFade::FADE_OUT, 1.0f, 1.0f, 1.0f);
3774+ const float VOXEL_BOUNDS_ADJUST = 0.01f;
3775+ float slightlyBigger = _mouseVoxel.s * VOXEL_BOUNDS_ADJUST;
3776+ fade.voxelDetails.x = _mouseVoxel.x - slightlyBigger;
3777+ fade.voxelDetails.y = _mouseVoxel.y - slightlyBigger;
3778+ fade.voxelDetails.z = _mouseVoxel.z - slightlyBigger;
3779+ fade.voxelDetails.s = _mouseVoxel.s + slightlyBigger + slightlyBigger;
3780+ _voxelFades.push_back(fade);
3781+
3782+ // inject a sound effect
3783+ injectVoxelAddedSoundEffect();
36393784
36403785 // remember the position for drag detection
36413786 _justEditedVoxel = true;
36423787
3643− AudioInjector* voxelInjector = AudioInjectionManager::injectorWithCapacity(11025);
3644− voxelInjector->setPosition(glm::vec3(_mouseVoxel.x, _mouseVoxel.y, _mouseVoxel.z));
3645− //_myAvatar.getPosition()
3646−// voxelInjector->setBearing(-1 * _myAvatar.getAbsoluteHeadYaw());
3647− voxelInjector->setVolume (16 * pow (_mouseVoxel.s, 2) / .0000001); //255 is max, and also default value
3648−
3649− /* for (int i = 0; i
3650− < 22050; i++) {
3651− if (i % 4 == 0) {
3652− voxelInjector->addSample(4000);
3653− } else if (i % 4 == 1) {
3654− voxelInjector->addSample(0);
3655− } else if (i % 4 == 2) {
3656− voxelInjector->addSample(-4000);
3657− } else {
3658− voxelInjector->addSample(0);
3659− }
3660− */
3661−
3662−
3663− const float BIG_VOXEL_MIN_SIZE = .01f;
3664−
3665− for (int i = 0; i < 11025; i++) {
3666−
3667− /*
3668− A440 square wave
3669− if (sin(i * 2 * PIE / 50)>=0) {
3670− voxelInjector->addSample(4000);
3671− } else {
3672− voxelInjector->addSample(-4000);
3673− }
3674− */
3675−
3676− if (_mouseVoxel.s > BIG_VOXEL_MIN_SIZE) {
3677− voxelInjector->addSample(20000 * sin((i * 2 * PIE) / (500 * sin((i + 1) / 200))));
3678− } else {
3679− voxelInjector->addSample(16000 * sin(i / (1.5 * log (_mouseVoxel.s / .0001) * ((i + 11025) / 5512.5)))); //808
3680− }
3681− }
3682−
3683− //voxelInjector->addSample(32500 * sin(i/(2 * 1 * ((i+5000)/5512.5)))); //80
3684− //voxelInjector->addSample(20000 * sin(i/(6 * (_mouseVoxel.s/.001) *((i+5512.5)/5512.5)))); //808
3685− //voxelInjector->addSample(20000 * sin(i/(6 * ((i+5512.5)/5512.5)))); //808
3686− //voxelInjector->addSample(4000 * sin(i * 2 * PIE /50)); //A440 sine wave
3687− //voxelInjector->addSample(4000 * sin(i * 2 * PIE /50) * sin (i/500)); //A440 sine wave with amplitude modulation
3688−
3689− //FM library
3690− //voxelInjector->addSample(20000 * sin((i * 2 * PIE) /(500*sin((i+1)/200)))); //FM 1 dubstep
3691− //voxelInjector->addSample(20000 * sin((i * 2 * PIE) /(300*sin((i+1)/5.0)))); //FM 2 flange sweep
3692− //voxelInjector->addSample(10000 * sin((i * 2 * PIE) /(500*sin((i+1)/500.0)))); //FM 3 resonant pulse
3693−
3694− AudioInjectionManager::threadInjector(voxelInjector);
36953788 }
36963789 } else if (_deleteVoxelMode->isChecked()) {
36973790 deleteVoxelUnderCursor();
3791+ VoxelFade fade(VoxelFade::FADE_OUT, NODE_KILLED_RED, NODE_KILLED_GREEN, NODE_KILLED_BLUE);
3792+ const float VOXEL_BOUNDS_ADJUST = 0.01f;
3793+ float slightlyBigger = _mouseVoxel.s * VOXEL_BOUNDS_ADJUST;
3794+ fade.voxelDetails.x = _mouseVoxel.x - slightlyBigger;
3795+ fade.voxelDetails.y = _mouseVoxel.y - slightlyBigger;
3796+ fade.voxelDetails.z = _mouseVoxel.z - slightlyBigger;
3797+ fade.voxelDetails.s = _mouseVoxel.s + slightlyBigger + slightlyBigger;
3798+ _voxelFades.push_back(fade);
3799+
36983800 } else if (_eyedropperMode->isChecked()) {
36993801 eyedropperVoxelUnderCursor();
37003802 } else {
@@ -3709,17 +3811,20 @@ void Application::deleteVoxelUnderCursor() { · 8 unmodified lines
37093811 // sending delete to the server is sufficient, server will send new version so we see updates soon enough
37103812 sendVoxelEditMessage(PACKET_TYPE_ERASE_VOXEL, _mouseVoxel);
37113813 AudioInjector* voxelInjector = AudioInjectionManager::injectorWithCapacity(5000);
3712− voxelInjector->setPosition(glm::vec3(_mouseVoxel.x, _mouseVoxel.y, _mouseVoxel.z));
3713−// voxelInjector->setBearing(0); //straight down the z axis
3714− voxelInjector->setVolume (255); //255 is max, and also default value
3715−
37163814
3717− for (int i = 0; i < 5000; i++) {
3718− voxelInjector->addSample(10000 * sin((i * 2 * PIE) / (500 * sin((i + 1) / 500.0)))); //FM 3 resonant pulse
3719− //voxelInjector->addSample(20000 * sin((i) /((4 / _mouseVoxel.s) * sin((i)/(20 * _mouseVoxel.s / .001))))); //FM 2 comb filter
3815+ if (voxelInjector) {
3816+ voxelInjector->setPosition(glm::vec3(_mouseVoxel.x, _mouseVoxel.y, _mouseVoxel.z));
3817+ //voxelInjector->setBearing(0); //straight down the z axis
3818+ voxelInjector->setVolume (255); //255 is max, and also default value
3819+
3820+
3821+ for (int i = 0; i < 5000; i++) {
3822+ voxelInjector->addSample(10000 * sin((i * 2 * PIE) / (500 * sin((i + 1) / 500.0)))); //FM 3 resonant pulse
3823+ //voxelInjector->addSample(20000 * sin((i) /((4 / _mouseVoxel.s) * sin((i)/(20 * _mouseVoxel.s / .001))))); //FM 2 comb filter
3824+ }
3825+
3826+ AudioInjectionManager::threadInjector(voxelInjector);
37203827 }
3721−
3722− AudioInjectionManager::threadInjector(voxelInjector);
37233828 }
37243829 // remember the position for drag detection
37253830 _justEditedVoxel = true;
@@ -3816,6 +3921,57 @@ void Application::attachNewHeadToNode(Node* newNode) { · 90 unmodified lines
38163921 }
38173922 }
38183923
3924+void Application::nodeAdded(Node* node) {
3925+}
3926+
3927+void Application::nodeKilled(Node* node) {
3928+ if (node->getType() == NODE_TYPE_VOXEL_SERVER) {
3929+ uint16_t nodeID = node->getNodeID();
3930+ // see if this is the first we've heard of this node...
3931+ if (_voxelServerJurisdictions.find(nodeID) != _voxelServerJurisdictions.end()) {
3932+ VoxelPositionSize jurisditionDetails;
3933+ jurisditionDetails = _voxelServerJurisdictions[nodeID];
3934+
3935+ printf("voxel server going away...... v[%f, %f, %f, %f]\n",
3936+ jurisditionDetails.x, jurisditionDetails.y, jurisditionDetails.z, jurisditionDetails.s);
3937+
3938+ // Add the jurisditionDetails object to the list of "fade outs"
3939+ VoxelFade fade(VoxelFade::FADE_OUT, NODE_KILLED_RED, NODE_KILLED_GREEN, NODE_KILLED_BLUE);
3940+ fade.voxelDetails = jurisditionDetails;
3941+ _voxelFades.push_back(fade);
3942+ }
3943+ }
3944+}
3945+
3946+int Application::parseVoxelStats(unsigned char* messageData, ssize_t messageLength, sockaddr senderAddress) {
3947+
3948+ // parse the incoming stats data, and stick it into our averaging stats object for now... even though this
3949+ // means mixing in stats from potentially multiple servers.
3950+ int statsMessageLength = _voxelSceneStats.unpackFromMessage(messageData, messageLength);
3951+
3952+ // But, also identify the sender, and keep track of the contained jurisdiction root for this server
3953+ Node* voxelServer = NodeList::getInstance()->nodeWithAddress(&senderAddress);
3954+ uint16_t nodeID = voxelServer->getNodeID();
3955+
3956+ VoxelPositionSize jurisditionDetails;
3957+ voxelDetailsForCode(_voxelSceneStats.getJurisdictionRoot(), jurisditionDetails);
3958+
3959+ // see if this is the first we've heard of this node...
3960+ if (_voxelServerJurisdictions.find(nodeID) == _voxelServerJurisdictions.end()) {
3961+ printf("stats from new voxel server... v[%f, %f, %f, %f]\n",
3962+ jurisditionDetails.x, jurisditionDetails.y, jurisditionDetails.z, jurisditionDetails.s);
3963+
3964+ // Add the jurisditionDetails object to the list of "fade outs"
3965+ VoxelFade fade(VoxelFade::FADE_OUT, NODE_ADDED_RED, NODE_ADDED_GREEN, NODE_ADDED_BLUE);
3966+ fade.voxelDetails = jurisditionDetails;
3967+ _voxelFades.push_back(fade);
3968+ }
3969+ // store jurisdiction details for later use
3970+ _voxelServerJurisdictions[nodeID] = jurisditionDetails;
3971+
3972+ return statsMessageLength;
3973+}
3974+
38193975 // Receive packets from other nodes/servers and decide what to do with them!
38203976 void* Application::networkReceive(void* args) {
38213977 sockaddr senderAddress;
@@ -3859,7 +4015,8 @@ void* Application::networkReceive(void* args) { · 37 unmodified lines
38594015 // immediately following them inside the same packet. So, we process the PACKET_TYPE_VOXEL_STATS first
38604016 // then process any remaining bytes as if it was another packet
38614017 if (messageData[0] == PACKET_TYPE_VOXEL_STATS) {
3862− int statsMessageLength = app->_voxelSceneStats.unpackFromMessage(messageData, messageLength);
4018+
4019+ int statsMessageLength = app->parseVoxelStats(messageData, messageLength, senderAddress);
38634020 if (messageLength > statsMessageLength) {
38644021 messageData += statsMessageLength;
38654022 messageLength -= statsMessageLength;
@@ -3953,11 +4110,11 @@ void Application::saveAction(QSettings* set, QAction* action) { · 87 unmodified lines
39534110 }
39544111
39554112 void Application::loadSettings(QSettings* settings) {
3956− if (!settings) {
4113+ if (!settings) {
39574114 settings = getSettings();
39584115 }
39594116
3960− _headCameraPitchYawScale = loadSetting(settings, "headCameraPitchYawScale", 0.0f);
4117+ _gyroCameraSensitivity = loadSetting(settings, "gyroCameraSensitivity", 0.5f);
39614118 _audioJitterBufferSamples = loadSetting(settings, "audioJitterBufferSamples", 0);
39624119 _horizontalFieldOfView = loadSetting(settings, "horizontalFieldOfView", HORIZONTAL_FIELD_OF_VIEW_DEGREES);
39634120
@@ -3981,7 +4138,7 @@ void Application::saveSettings(QSettings* settings) { · 17 unmodified lines
39814138 settings = getSettings();
39824139 }
39834140
3984− settings->setValue("headCameraPitchYawScale", _headCameraPitchYawScale);
4141+ settings->setValue("gyroCameraSensitivity", _gyroCameraSensitivity);
39854142 settings->setValue("audioJitterBufferSamples", _audioJitterBufferSamples);
39864143 settings->setValue("horizontalFieldOfView", _horizontalFieldOfView);
39874144 settings->beginGroup("View Frustum Offset Camera");

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