瀏覽代碼

Remove unused placeholdedHeroes field

AlexVinS 9 年之前
父節點
當前提交
4ebafa17b4
共有 2 個文件被更改,包括 10 次插入5 次删除
  1. 1 1
      lib/mapping/CMap.h
  2. 9 4
      lib/mapping/MapFormatH3M.cpp

+ 1 - 1
lib/mapping/CMap.h

@@ -259,7 +259,7 @@ public:
 	std::vector<PlayerInfo> players; /// The default size of the vector is PlayerColor::PLAYER_LIMIT.
 	ui8 howManyTeams;
 	std::vector<bool> allowedHeroes;
-	std::vector<ui16> placeholdedHeroes;
+
 	bool areAnyPlayers; /// Unused. True if there are any playable players on the map.
 
 	/// "main quests" of the map that describe victory and loss conditions

+ 9 - 4
lib/mapping/MapFormatH3M.cpp

@@ -615,10 +615,15 @@ void CMapLoaderH3M::readAllowedHeroes()
 	if(mapHeader->version > EMapFormat::ROE)
 	{
 		int placeholdersQty = reader.readUInt32();
-		for(int p = 0; p < placeholdersQty; ++p)
-		{
-			mapHeader->placeholdedHeroes.push_back(reader.readUInt8());
-		}
+
+		reader.skip(placeholdersQty * 1);
+
+//		std::vector<ui16> placeholdedHeroes;
+//
+//		for(int p = 0; p < placeholdersQty; ++p)
+//		{
+//			placeholdedHeroes.push_back(reader.readUInt8());
+//		}
 	}
 }