1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-07-01 00:45:26 +02:00

* hopefully resolved bugs 19 and 20 reported by Zamolxis

This commit is contained in:
mateuszb
2009-02-06 15:56:03 +00:00
parent ba9b58d3a4
commit 811e6c0945
5 changed files with 19 additions and 6 deletions

View File

@ -195,8 +195,9 @@ int lowestSpeed(const CGHeroInstance * chi)
return ret;
}
unsigned int CGHeroInstance::getTileCost(const EterrainType & ttype, const Eroad & rdtype, const Eriver & rvtype) const
unsigned int CGHeroInstance::getTileCost(const EterrainType & ttype, const Eroad & rdtype, const Eriver & rvtype, const int & remaingMP) const
{
if(remaingMP <= 100) return 100; //workaround for strange behaviour manifested by Heroes III
unsigned int ret = type->heroClass->terrCosts[ttype];
//applying pathfinding skill
switch(getSecSkillLevel(0))