Explorar o código

Fix pathfinding reducing tile cost by only 1 point

Ivan Savenko hai 9 meses
pai
achega
ced98f4698
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      lib/pathfinder/TurnInfo.cpp

+ 1 - 1
lib/pathfinder/TurnInfo.cpp

@@ -120,7 +120,7 @@ TurnInfo::TurnInfo(TurnInfoCache * sharedCache, const CGHeroInstance * target, i
 	{
 		static const CSelector selector = Selector::type()(BonusType::ROUGH_TERRAIN_DISCOUNT);
 		const auto & bonuses = sharedCache->roughTerrainDiscount.getBonusList(target, selector);
-		roughTerrainDiscountValue = bonuses->getFirst(daySelector) != nullptr;
+		roughTerrainDiscountValue = bonuses->valOfBonuses(daySelector);
 	}
 
 	{