Skip to content

Commit

Permalink
Order visualizations of sounds of the same type by the distance to th…
Browse files Browse the repository at this point in the history
…e screen
  • Loading branch information
danielkrupinski committed Nov 18, 2023
1 parent e74c51f commit 4e18b4e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions Source/Features/Sound/BombBeepVisualizer.h
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ class BombBeepVisualizer : public TogglableFeature<BombBeepVisualizer> {
return;

style.setOpacity(opacity);
style.setZIndex(-soundInClipSpace.z);

const auto deviceCoordinates = soundInClipSpace.toNormalizedDeviceCoordinates();
cs2::CTransform3D* transformations[]{ params.transformFactory.create<cs2::CTransformScale3D>(
Expand Down
1 change: 1 addition & 0 deletions Source/Features/Sound/BombPlantVisualizer.h
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ class BombPlantVisualizer : public TogglableFeature<BombPlantVisualizer> {
return;

style.setOpacity(opacity);
style.setZIndex(-soundInClipSpace.z);

const auto deviceCoordinates = soundInClipSpace.toNormalizedDeviceCoordinates();
cs2::CTransform3D* transformations[]{ params.transformFactory.create<cs2::CTransformScale3D>(
Expand Down
1 change: 1 addition & 0 deletions Source/Features/Sound/FootstepVisualizer.h
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ class FootstepVisualizer : public TogglableFeature<FootstepVisualizer> {
return;

style.setOpacity(opacity);
style.setZIndex(-soundInClipSpace.z);

const auto deviceCoordinates = soundInClipSpace.toNormalizedDeviceCoordinates();
cs2::CTransform3D* transformations[]{ params.transformFactory.create<cs2::CTransformScale3D>(
Expand Down

0 comments on commit 4e18b4e

Please sign in to comment.