1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-15 00:05:02 +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

@ -1650,7 +1650,7 @@ bool CGameHandler::moveHero( ObjectInstanceID hid, int3 dst, ui8 teleporting, Pl
}
const TerrainTile t = *gs->getTile(hmpos);
const int cost = gs->getMovementCost(h, h->getPosition(false), hmpos, h->movement);
const int cost = gs->getMovementCost(h, h->getPosition(), hmpos, h->movement);
const int3 guardPos = gs->guardingCreaturePosition(hmpos);
const bool embarking = !h->boat && !t.visitableObjects.empty() && t.visitableObjects.back()->ID == Obj::BOAT;