diff options
author | frosch <frosch@openttd.org> | 2021-05-09 17:10:07 +0200 |
---|---|---|
committer | frosch <github@elsenhans.name> | 2021-05-12 23:22:41 +0200 |
commit | f96f11395162a8d57f5fdcef18c7a64f7acf76f8 (patch) | |
tree | 3bd204df568095710d745b6bcb70cd231f8e928b /src/sound.cpp | |
parent | 22567a1f43d29a7596b9ef88441d5a65776fa2c8 (diff) | |
download | openttd-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.cpp | 1 |
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; |