1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-06 09:09:40 +02:00

- Changed aggregation method so now fuzzy engine takes all the factors into consideration

- Heroes now will use real path cost and their movement, which has numerous advantages:
* Actual movement cost is taken into consideration
* Groups of heroes will keep order
* Fastest heroes will be used for exploration first
This commit is contained in:
DjWarmonger
2014-02-07 08:23:31 +00:00
parent 54fbdfec5e
commit a9b10c8099
8 changed files with 55 additions and 39 deletions

View File

@@ -332,6 +332,11 @@ bool CCallback::getPath2( int3 dest, CGPath &ret )
return cl->pathInfo->getPath(dest, ret);
}
int CCallback::getMovementCost(const CGHeroInstance * hero, int3 dest)
{
return gs->getMovementCost(hero, hero->visitablePos(), dest, hero->movement);
}
void CCallback::recalculatePaths()
{
cl->calculatePaths(cl->IGameCallback::getSelectedHero(*player));