瀏覽代碼

Comments save format backward compatability code as Ivan suggested

Also we should always handle RumorState::TYPE_NONE in getTavernRumor properly anyway.
ArseniyShestakov 10 年之前
父節點
當前提交
e872b400b7
共有 4 個文件被更改,包括 4 次插入4 次删除
  1. 1 1
      lib/CGameInfoCallback.cpp
  2. 1 1
      lib/CGameState.h
  3. 1 1
      lib/mapObjects/CGHeroInstance.h
  4. 1 1
      lib/spells/CSpellHandler.h

+ 1 - 1
lib/CGameInfoCallback.cpp

@@ -577,7 +577,7 @@ EPlayerStatus::EStatus CGameInfoCallback::getPlayerStatus(PlayerColor player, bo
 std::string CGameInfoCallback::getTavernRumor(const CGObjectInstance * townOrTavern) const
 {
 	std::string text = "", extraText = "";
-	if(gs->rumor.type == RumorState::TYPE_NONE) // (version < 755 backward compatability
+	if(gs->rumor.type == RumorState::TYPE_NONE)
 		return text;
 
 	auto rumor = gs->rumor.last[gs->rumor.type];

+ 1 - 1
lib/CGameState.h

@@ -249,7 +249,7 @@ public:
 	template <typename Handler> void serialize(Handler &h, const int version)
 	{
 		h & scenarioOps & initialOpts & currentPlayer & day & map & players & teams & hpool & globalEffects & rand;
-		if(version >= 755)
+		if(version >= 755) //save format backward compatibility
 		{
 			h & rumor;
 		}

+ 1 - 1
lib/mapObjects/CGHeroInstance.h

@@ -79,7 +79,7 @@ public:
 		template <typename Handler> void serialize(Handler &h, const int version)
 		{
 			h & patrolling;
-			if(version >= 755)
+			if(version >= 755) //save format backward compatibility
 			{
 				h & initialPos;
 			}

+ 1 - 1
lib/spells/CSpellHandler.h

@@ -75,7 +75,7 @@ public:
 		template <typename Handler> void serialize(Handler & h, const int version)
 		{
 			h & resourceName & verticalPosition;
-			if(version >= 754)
+			if(version >= 754) //save format backward compatibility
 			{
 				h & pause;
 			}