summaryrefslogtreecommitdiff
path: root/src/sound.cpp
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2021-05-09 17:10:07 +0200
committerfrosch <github@elsenhans.name>2021-05-12 23:22:41 +0200
commitf96f11395162a8d57f5fdcef18c7a64f7acf76f8 (patch)
tree3bd204df568095710d745b6bcb70cd231f8e928b /src/sound.cpp
parent22567a1f43d29a7596b9ef88441d5a65776fa2c8 (diff)
downloadopenttd-f96f11395162a8d57f5fdcef18c7a64f7acf76f8.tar.xz
Codechange: use IterateFromBack/Front only if the order is important.
Use Iterate if the order does not matter.
Diffstat (limited to 'src/sound.cpp')
-rw-r--r--src/sound.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/sound.cpp b/src/sound.cpp
index 413c70af2..c22e04437 100644
--- a/src/sound.cpp
+++ b/src/sound.cpp
@@ -245,6 +245,7 @@ static void SndPlayScreenCoordFx(SoundID sound, int left, int right, int top, in
{
if (_settings_client.music.effect_vol == 0) return;
+ /* Iterate from back, so that main viewport is checked first */
for (const Window *w : Window::IterateFromBack()) {
const Viewport *vp = w->viewport;