Showing the changes to interface/src/Application.cpp (1 of 30 files). Show all
Unified · Split
| @@ -622,6 +622,15 @@ Application::Application(int& argc, char** argv, QElapsedTimer &startup_time) : · 621 unmodified lines | ||
| 622 | 622 | // Setup the userInputMapper with the actions |
| 623 | 623 | auto userInputMapper = DependencyManager::get<UserInputMapper>(); |
| 624 | 624 | connect(userInputMapper.data(), &UserInputMapper::actionEvent, &_controllerScriptingInterface, &AbstractControllerScriptingInterface::actionEvent); |
| 625 | + connect(userInputMapper.data(), &UserInputMapper::actionEvent, [this](int action, float state) { | |
| 626 | + if (state) { | |
| 627 | + switch (action) { | |
| 628 | + case UserInputMapper::Action::TOGGLE_MUTE: | |
| 629 | + DependencyManager::get<AudioClient>()->toggleMute(); | |
| 630 | + break; | |
| 631 | + } | |
| 632 | + } | |
| 633 | + }); | |
| 625 | 634 | |
| 626 | 635 | // Setup the keyboardMouseDevice and the user input mapper with the default bindings |
| 627 | 636 | _keyboardMouseDevice->registerToUserInputMapper(*userInputMapper); |
| @@ -3070,9 +3079,8 @@ void Application::queryOctree(NodeType_t serverType, PacketType packetType, Node · 2442 unmodified lines | ||
| 3070 | 3079 | voxelDetailsForCode(rootCode, rootDetails); |
| 3071 | 3080 | AACube serverBounds(glm::vec3(rootDetails.x * TREE_SCALE, |
| 3072 | 3081 | rootDetails.y * TREE_SCALE, |
| 3073 | − rootDetails.z * TREE_SCALE), | |
| 3082 | + rootDetails.z * TREE_SCALE) - glm::vec3(HALF_TREE_SCALE), | |
| 3074 | 3083 | rootDetails.s * TREE_SCALE); |
| 3075 | − | |
| 3076 | 3084 | ViewFrustum::location serverFrustumLocation = _viewFrustum.cubeInFrustum(serverBounds); |
| 3077 | 3085 | |
| 3078 | 3086 | if (serverFrustumLocation != ViewFrustum::OUTSIDE) { |
| @@ -3137,11 +3145,10 @@ void Application::queryOctree(NodeType_t serverType, PacketType packetType, Node · 58 unmodified lines | ||
| 3137 | 3145 | voxelDetailsForCode(rootCode, rootDetails); |
| 3138 | 3146 | AACube serverBounds(glm::vec3(rootDetails.x * TREE_SCALE, |
| 3139 | 3147 | rootDetails.y * TREE_SCALE, |
| 3140 | − rootDetails.z * TREE_SCALE), | |
| 3148 | + rootDetails.z * TREE_SCALE) - glm::vec3(HALF_TREE_SCALE), | |
| 3141 | 3149 | rootDetails.s * TREE_SCALE); |
| 3142 | 3150 | |
| 3143 | 3151 | |
| 3144 | − | |
| 3145 | 3152 | ViewFrustum::location serverFrustumLocation = _viewFrustum.cubeInFrustum(serverBounds); |
| 3146 | 3153 | if (serverFrustumLocation != ViewFrustum::OUTSIDE) { |
| 3147 | 3154 | inView = true; |
| @@ -3160,7 +3167,7 @@ void Application::queryOctree(NodeType_t serverType, PacketType packetType, Node · 12 unmodified lines | ||
| 3160 | 3167 | } else if (unknownView) { |
| 3161 | 3168 | if (wantExtraDebugging) { |
| 3162 | 3169 | qCDebug(interfaceapp) << "no known jurisdiction for node " << *node << ", give it budget of " |
| 3163 | − << perUnknownServer << " to send us jurisdiction."; | |
| 3170 | + << perUnknownServer << " to send us jurisdiction."; | |
| 3164 | 3171 | } |
| 3165 | 3172 | |
| 3166 | 3173 | // set the query's position/orientation to be degenerate in a manner that will get the scene quickly |
| @@ -5101,11 +5108,10 @@ void Application::emulateMouse(Hand* hand, float click, float shift, int index) · 1934 unmodified lines | ||
| 5101 | 5108 | } |
| 5102 | 5109 | |
| 5103 | 5110 | void Application::crashApplication() { |
| 5111 | + qCDebug(interfaceapp) << "Intentionally crashed Interface"; | |
| 5104 | 5112 | QObject* object = nullptr; |
| 5105 | 5113 | bool value = object->isWindowType(); |
| 5106 | 5114 | Q_UNUSED(value); |
| 5107 | − | |
| 5108 | − qCDebug(interfaceapp) << "Intentionally crashed Interface"; | |
| 5109 | 5115 | } |
| 5110 | 5116 | |
| 5111 | 5117 | void Application::setActiveDisplayPlugin(const QString& pluginName) { |