History

turn down collision sounds

Philip Rosedale committed 13 years ago

Commit bc1ac6b1 parent ba2c98a4 files · +13 −14Browse files

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

Unified · Split

interface/src/Application.cpp+6−3
@@ -196,7 +196,6 @@ Application::Application(int& argc, char** argv, timeval &startup_time) : · 195 unmodified lines
196196 _isTouchPressed(false),
197197 _yawFromTouch(0.0f),
198198 _pitchFromTouch(0.0f),
199− _groundPlaneImpact(0.0f),
200199 _mousePressed(false),
201200 _isHoverVoxel(false),
202201 _isHoverVoxelSounding(false),
@@ -2789,8 +2788,12 @@ void Application::displayOverlay() { · 2586 unmodified lines
27892788 glDisable(GL_DEPTH_TEST);
27902789 glDisable(GL_LIGHTING);
27912790
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+ }
27942797
27952798 #ifndef _WIN32
27962799 _audio.render(_glWidget->width(), _glWidget->height());

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