Quellcode durchsuchen

Update BuildAnalyzer.cpp

Revert unintentionally commited changes
Xilmi vor 1 Jahr
Ursprung
Commit
0c488145b9
1 geänderte Dateien mit 0 neuen und 8 gelöschten Zeilen
  1. 0 8
      AI/Nullkiller/Analyzers/BuildAnalyzer.cpp

+ 0 - 8
AI/Nullkiller/Analyzers/BuildAnalyzer.cpp

@@ -148,7 +148,6 @@ void BuildAnalyzer::update()
 	auto towns = ai->cb->getTownsInfo();
 
 	float economyDevelopmentCost = 0;
-	TResources nonGoldEconomyResources;
 
 	for(const CGTownInstance* town : towns)
 	{
@@ -165,10 +164,7 @@ void BuildAnalyzer::update()
 		for(auto building : developmentInfo.toBuild)
 		{
 			if (building.dailyIncome[EGameResID::GOLD] > 0)
-			{
 				economyDevelopmentCost += building.buildCostWithPrerequisites[EGameResID::GOLD];
-				nonGoldEconomyResources += building.buildCostWithPrerequisites;
-			}
 		}
 		armyCost += developmentInfo.armyCost;
 
@@ -177,10 +173,6 @@ void BuildAnalyzer::update()
 			logAi->trace("Building preferences %s", bi.toString());
 		}
 	}
-	nonGoldEconomyResources[EGameResID::GOLD] = 0;
-	//If we don't have the non-gold-resources to build a structure, we also don't need to save gold for it and can consider building something else instead
-	if (!ai->getFreeResources().canAfford(nonGoldEconomyResources))
-		economyDevelopmentCost = 0;
 
 	std::sort(developmentInfos.begin(), developmentInfos.end(), [](const TownDevelopmentInfo & t1, const TownDevelopmentInfo & t2) -> bool
 	{