mirror of
https://github.com/vcmi/vcmi.git
synced 2025-08-08 22:26:51 +02:00
Fix pathfinding reducing tile cost by only 1 point
This commit is contained in:
@@ -120,7 +120,7 @@ TurnInfo::TurnInfo(TurnInfoCache * sharedCache, const CGHeroInstance * target, i
|
|||||||
{
|
{
|
||||||
static const CSelector selector = Selector::type()(BonusType::ROUGH_TERRAIN_DISCOUNT);
|
static const CSelector selector = Selector::type()(BonusType::ROUGH_TERRAIN_DISCOUNT);
|
||||||
const auto & bonuses = sharedCache->roughTerrainDiscount.getBonusList(target, selector);
|
const auto & bonuses = sharedCache->roughTerrainDiscount.getBonusList(target, selector);
|
||||||
roughTerrainDiscountValue = bonuses->getFirst(daySelector) != nullptr;
|
roughTerrainDiscountValue = bonuses->valOfBonuses(daySelector);
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user