From 76d5b459f162aed05915c18adf2ac148d93ec748 Mon Sep 17 00:00:00 2001 From: Ivan Savenko Date: Fri, 28 Apr 2023 16:53:45 +0300 Subject: [PATCH 1/3] Fixed music playback on switching between towns --- client/windows/CCastleInterface.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/client/windows/CCastleInterface.cpp b/client/windows/CCastleInterface.cpp index e37471223..16d28aaa6 100644 --- a/client/windows/CCastleInterface.cpp +++ b/client/windows/CCastleInterface.cpp @@ -1206,13 +1206,17 @@ CCastleInterface::CCastleInterface(const CGTownInstance * Town, const CGTownInst townlist->onSelect = std::bind(&CCastleInterface::townChange, this); recreateIcons(); - adventureInt->onAudioPaused(); + if (!from) + adventureInt->onAudioPaused(); CCS->musich->playMusic(town->town->clientInfo.musicTheme, true, false); } CCastleInterface::~CCastleInterface() { - if (adventureInt) // may happen on exiting client with open castle interface + // resume map audio if: + // adventureInt exists (may happen on exiting client with open castle interface) + // castleInt has not been replaced (happens on switching between towns inside castle interface) + if (adventureInt && LOCPLINT->castleInt == this) adventureInt->onAudioResumed(); if(LOCPLINT->castleInt == this) LOCPLINT->castleInt = nullptr; From c55f52e84f50b4158bcc1c4ab32a5cb118c963a4 Mon Sep 17 00:00:00 2001 From: Ivan Savenko Date: Fri, 28 Apr 2023 16:54:00 +0300 Subject: [PATCH 2/3] Fixed disabled special weeks --- server/CGameHandler.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/CGameHandler.cpp b/server/CGameHandler.cpp index 886ef9e69..325b3db31 100644 --- a/server/CGameHandler.cpp +++ b/server/CGameHandler.cpp @@ -1812,7 +1812,7 @@ void CGameHandler::newTurn() n.specialWeek = NewTurn::DEITYOFFIRE; n.creatureid = CreatureID::IMP; } - else if(!VLC->settings()->getBoolean(EGameSettings::CREATURES_ALLOW_RANDOM_SPECIAL_WEEKS)) + else if(VLC->settings()->getBoolean(EGameSettings::CREATURES_ALLOW_RANDOM_SPECIAL_WEEKS)) { int monthType = getRandomGenerator().nextInt(99); if (newMonth) //new month From 2da5b7efb8506594d0b78e902bb13df464e6ae09 Mon Sep 17 00:00:00 2001 From: Ivan Savenko Date: Fri, 28 Apr 2023 17:08:50 +0300 Subject: [PATCH 3/3] Updated changelog --- ChangeLog.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ChangeLog.md b/ChangeLog.md index 0bce56f4f..1090e5eb5 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -8,6 +8,8 @@ * Fixed good morale happening after defeating last enemy unit * Fixed death animation of Efreeti killed by petrification attack * Fixed crash on leaving to main menu from battle in hotseat mode +* Fixed music playback on switching between towns +* Special months (double growth and plague) will now appear correctly * Adventure map spells are no longer visible on units in battle * Attempt to cast spell with no valid targets in hotseat will show appropriate error message * RMG settings will now show all existing in game templates and not just those suitable for current settings @@ -17,6 +19,7 @@ * Fixed blocked progress in Launcher on language detection failure * Launcher will now correctly handle selection of Ddata directory in H3 install * Map editor will now correctly save message property for events and pandoras +* Fixed incorrect saving of heroes portraits in editor # 1.1.1 -> 1.2.0