Showing the changes to interface/src/Application.cpp (1 of 4 files). Show all
Unified · Split
| @@ -196,7 +196,6 @@ Application::Application(int& argc, char** argv, timeval &startup_time) : · 195 unmodified lines | ||
| 196 | 196 | _isTouchPressed(false), |
| 197 | 197 | _yawFromTouch(0.0f), |
| 198 | 198 | _pitchFromTouch(0.0f), |
| 199 | − _groundPlaneImpact(0.0f), | |
| 200 | 199 | _mousePressed(false), |
| 201 | 200 | _isHoverVoxel(false), |
| 202 | 201 | _isHoverVoxelSounding(false), |
| @@ -2789,8 +2788,12 @@ void Application::displayOverlay() { · 2586 unmodified lines | ||
| 2789 | 2788 | glDisable(GL_DEPTH_TEST); |
| 2790 | 2789 | glDisable(GL_LIGHTING); |
| 2791 | 2790 | |
| 2792 | − // Display a single screen-size quad to | |
| 2793 | − renderCollisionOverlay(_glWidget->width(), _glWidget->height(), _audio.getCollisionSoundMagnitude()); | |
| 2791 | + // Display a single screen-size quad to create an alpha blended 'collision' flash | |
| 2792 | + float collisionSoundMagnitude = _audio.getCollisionSoundMagnitude(); | |
| 2793 | + const float VISIBLE_COLLISION_SOUND_MAGNITUDE = 0.5f; | |
| 2794 | + if (collisionSoundMagnitude > VISIBLE_COLLISION_SOUND_MAGNITUDE) { | |
| 2795 | + renderCollisionOverlay(_glWidget->width(), _glWidget->height(), _audio.getCollisionSoundMagnitude()); | |
| 2796 | + } | |
| 2794 | 2797 | |
| 2795 | 2798 | #ifndef _WIN32 |
| 2796 | 2799 | _audio.render(_glWidget->width(), _glWidget->height()); |