mirror of
https://github.com/vcmi/vcmi.git
synced 2025-09-16 09:26:28 +02:00
CGameState: move two pathfinding-related functions to CPathfinderHelper
Both getMovementCost and getNeighbours have nothing to do with gamestate.
This commit is contained in:
@@ -421,7 +421,7 @@ float FuzzyHelper::evaluate (Goals::VisitTile & g)
|
||||
|
||||
//assert(cb->isInTheMap(g.tile));
|
||||
float turns = 0;
|
||||
float distance = cb->getMovementCost(g.hero.h, g.tile);
|
||||
float distance = CPathfinderHelper::getCost(g.hero.h, g.tile);
|
||||
if (!distance) //we stand on that tile
|
||||
turns = 0;
|
||||
else
|
||||
@@ -530,4 +530,4 @@ float FuzzyHelper::evaluate (Goals::AbstractGoal & g)
|
||||
void FuzzyHelper::setPriority (Goals::TSubgoal & g)
|
||||
{
|
||||
g->setpriority(g->accept(this)); //this enforces returned value is set
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user