mirror of
https://github.com/vcmi/vcmi.git
synced 2025-01-26 03:52:01 +02:00
Merge pull request #2823 from dydzio0614/pathfinder-tile-cost
Fix pathfinder tile cost
This commit is contained in:
commit
248afa523d
@ -79,7 +79,7 @@ ui32 CGHeroInstance::getTileMovementCost(const TerrainTile & dest, const Terrain
|
||||
!ti->hasBonusOfType(BonusType::NO_TERRAIN_PENALTY, from.terType->getIndex())) //no special movement bonus
|
||||
{
|
||||
|
||||
ret = VLC->terrainTypeHandler->getById(dest.terType->getId())->moveCost;
|
||||
ret = VLC->terrainTypeHandler->getById(from.terType->getId())->moveCost;
|
||||
ret -= ti->valOfBonuses(BonusType::ROUGH_TERRAIN_DISCOUNT);
|
||||
if(ret < GameConstants::BASE_MOVEMENT_COST)
|
||||
ret = GameConstants::BASE_MOVEMENT_COST;
|
||||
|
Loading…
x
Reference in New Issue
Block a user