From 7a510f76e2272c12d9c2e692ca57e5fa5db7dc69 Mon Sep 17 00:00:00 2001 From: Gymnasiast Date: Sun, 8 Nov 2015 11:07:35 +0100 Subject: [PATCH] Only play message sound in normal playing mode, fixes #2125 --- distribution/changelog.txt | 1 + src/management/news_item.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/distribution/changelog.txt b/distribution/changelog.txt index 2bbdc1ba28..7ad1a06df6 100644 --- a/distribution/changelog.txt +++ b/distribution/changelog.txt @@ -50,6 +50,7 @@ - Fix: Underflow in Heartline Twister ratings (original bug). - Fix: Map window now display the usable map size, not the technical one (original bug). - Fix: TD4 River Rapids will now have the correct seat colour (original bug). +- Fix: Message sound will no longer play in the editor modes (original bug). 0.0.2-beta (2015-06-21) ------------------------------------------------------------------------ diff --git a/src/management/news_item.c b/src/management/news_item.c index 044fe600bb..c3e059c761 100644 --- a/src/management/news_item.c +++ b/src/management/news_item.c @@ -82,7 +82,8 @@ static void news_item_tick_current() { int ticks; ticks = ++news_item_get(0)->ticks; - if (ticks == 1 && !(RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & 1)) { + // Only play news item sound when in normal playing mode + if (ticks == 1 && (RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) == SCREEN_FLAGS_PLAYING)) { // Play sound sound_play_panned(SOUND_NEWS_ITEM, RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_WIDTH, uint16) / 2, 0, 0, 0); }