Skip to content

Commit

Permalink
Fix pathfinding bug.
Browse files Browse the repository at this point in the history
  • Loading branch information
linuxrocks123 committed Oct 26, 2014
1 parent ec590b9 commit 436272f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/mapObjects/CGHeroInstance.cpp
Expand Up @@ -101,7 +101,11 @@ ui32 CGHeroInstance::getTileCost(const TerrainTile &dest, const TerrainTile &fro
}
}
if (!nativeArmy)
{
ret = VLC->heroh->terrCosts[from.terType];
ret-=getSecSkillLevel(SecondarySkill::PATHFINDING)*25;
ret = ret < 100 ? 100 : ret;
}
}
return ret;
}
Expand Down

0 comments on commit 436272f

Please sign in to comment.