Showing the changes to interface/src/Application.cpp (1 of 4 files). Show all
Unified · Split
| @@ -1124,7 +1124,7 @@ void Application::mousePressEvent(QMouseEvent* event) { · 1123 unmodified lines | ||
| 1124 | 1124 | _hoverVoxel.green / 255.f * GREEN_CLICK_FREQUENCY + |
| 1125 | 1125 | _hoverVoxel.blue / 255.f * BLUE_CLICK_FREQUENCY) / 3.f; |
| 1126 | 1126 | |
| 1127 | − _audio.startCollisionSound(1.0, frequency, 0.0, HOVER_VOXEL_DECAY); | |
| 1127 | + _audio.startCollisionSound(1.0, frequency, 0.0, HOVER_VOXEL_DECAY, false); | |
| 1128 | 1128 | _isHoverVoxelSounding = true; |
| 1129 | 1129 | |
| 1130 | 1130 | const float PERCENTAGE_TO_MOVE_TOWARD = 0.90f; |
| @@ -2039,7 +2039,7 @@ void Application::updateHoverVoxels(float deltaTime, glm::vec3& mouseRayOrigin, · 908 unmodified lines | ||
| 2039 | 2039 | _hoverVoxelOriginalColor[1] = _hoverVoxel.green; |
| 2040 | 2040 | _hoverVoxelOriginalColor[2] = _hoverVoxel.blue; |
| 2041 | 2041 | _hoverVoxelOriginalColor[3] = 1; |
| 2042 | − _audio.startCollisionSound(1.0, HOVER_VOXEL_FREQUENCY * _hoverVoxel.s * TREE_SCALE, 0.0, HOVER_VOXEL_DECAY); | |
| 2042 | + _audio.startCollisionSound(1.0, HOVER_VOXEL_FREQUENCY * _hoverVoxel.s * TREE_SCALE, 0.0, HOVER_VOXEL_DECAY, false); | |
| 2043 | 2043 | _isHoverVoxelSounding = true; |
| 2044 | 2044 | } |
| 2045 | 2045 | } |
| @@ -3176,10 +3176,12 @@ void Application::displayOverlay() { · 1130 unmodified lines | ||
| 3176 | 3176 | glDisable(GL_LIGHTING); |
| 3177 | 3177 | |
| 3178 | 3178 | // Display a single screen-size quad to create an alpha blended 'collision' flash |
| 3179 | − float collisionSoundMagnitude = _audio.getCollisionSoundMagnitude(); | |
| 3180 | − const float VISIBLE_COLLISION_SOUND_MAGNITUDE = 0.5f; | |
| 3181 | − if (collisionSoundMagnitude > VISIBLE_COLLISION_SOUND_MAGNITUDE) { | |
| 3182 | − renderCollisionOverlay(_glWidget->width(), _glWidget->height(), _audio.getCollisionSoundMagnitude()); | |
| 3179 | + if (_audio.getCollisionFlashesScreen()) { | |
| 3180 | + float collisionSoundMagnitude = _audio.getCollisionSoundMagnitude(); | |
| 3181 | + const float VISIBLE_COLLISION_SOUND_MAGNITUDE = 0.5f; | |
| 3182 | + if (collisionSoundMagnitude > VISIBLE_COLLISION_SOUND_MAGNITUDE) { | |
| 3183 | + renderCollisionOverlay(_glWidget->width(), _glWidget->height(), _audio.getCollisionSoundMagnitude()); | |
| 3184 | + } | |
| 3183 | 3185 | } |
| 3184 | 3186 | |
| 3185 | 3187 | #ifndef _WIN32 |