瀏覽代碼

Merge pull request #2087 from IvanSavenko/beta_fixes

Last fixes for 1.2.1
Ivan Savenko 2 年之前
父節點
當前提交
e4864bf25a
共有 3 個文件被更改,包括 10 次插入3 次删除
  1. 3 0
      ChangeLog.md
  2. 6 2
      client/windows/CCastleInterface.cpp
  3. 1 1
      server/CGameHandler.cpp

+ 3 - 0
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
 

+ 6 - 2
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;

+ 1 - 1
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