History

screen does not flash when voxels are clicked

Philip Rosedale committed 13 years ago

Commit 2991c8a1 parent f3b6e214 files · +15 −9Browse files

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

Unified · Split

interface/src/Application.cpp+8−6
@@ -1124,7 +1124,7 @@ void Application::mousePressEvent(QMouseEvent* event) { · 1123 unmodified lines
1124 _hoverVoxel.green / 255.f * GREEN_CLICK_FREQUENCY +1124 _hoverVoxel.green / 255.f * GREEN_CLICK_FREQUENCY +
1125 _hoverVoxel.blue / 255.f * BLUE_CLICK_FREQUENCY) / 3.f;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 _isHoverVoxelSounding = true;1128 _isHoverVoxelSounding = true;
1129 1129
1130 const float PERCENTAGE_TO_MOVE_TOWARD = 0.90f;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 _hoverVoxelOriginalColor[1] = _hoverVoxel.green;2039 _hoverVoxelOriginalColor[1] = _hoverVoxel.green;
2040 _hoverVoxelOriginalColor[2] = _hoverVoxel.blue;2040 _hoverVoxelOriginalColor[2] = _hoverVoxel.blue;
2041 _hoverVoxelOriginalColor[3] = 1;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 _isHoverVoxelSounding = true;2043 _isHoverVoxelSounding = true;
2044 }2044 }
2045 }2045 }
@@ -3176,10 +3176,12 @@ void Application::displayOverlay() { · 1130 unmodified lines
3176 glDisable(GL_LIGHTING);3176 glDisable(GL_LIGHTING);
3177 3177
3178 // Display a single screen-size quad to create an alpha blended 'collision' flash3178 // Display a single screen-size quad to create an alpha blended 'collision' flash
3179 float collisionSoundMagnitude = _audio.getCollisionSoundMagnitude();3179 if (_audio.getCollisionFlashesScreen()) {
3180 const float VISIBLE_COLLISION_SOUND_MAGNITUDE = 0.5f;3180 float collisionSoundMagnitude = _audio.getCollisionSoundMagnitude();
3181 if (collisionSoundMagnitude > VISIBLE_COLLISION_SOUND_MAGNITUDE) {3181 const float VISIBLE_COLLISION_SOUND_MAGNITUDE = 0.5f;
3182 renderCollisionOverlay(_glWidget->width(), _glWidget->height(), _audio.getCollisionSoundMagnitude());3182 if (collisionSoundMagnitude > VISIBLE_COLLISION_SOUND_MAGNITUDE) {
3183 renderCollisionOverlay(_glWidget->width(), _glWidget->height(), _audio.getCollisionSoundMagnitude());
3184 }
3183 }3185 }
3184 3186
3185 #ifndef _WIN323187 #ifndef _WIN32

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