jump test for pathfinder

This commit is contained in:
GameHerobrine 2023-01-08 02:07:45 +03:00
parent d0ec32dc02
commit dd4264998d
5 changed files with 28 additions and 15 deletions

View file

@ -58,10 +58,10 @@ class TileNavigator implements ITileNavigator
}
$visited[(string)$neighbor] = $neighbor;
if ($this->blockedProvider->isBlocked($neighbor))
{
continue;
}
//if ($this->blockedProvider->isBlocked($neighbor)) shouldnt be neccessary now
//{
// continue;
//}
$distbetweenCost = $this->distanceAlgorithm->calculate($current, $neighbor);
$tentativeG = $gScore[(string) $current] + $distbetweenCost;
$tentativeF = $distbetweenCost + $this->heuristicAlgorithm->calculate($neighbor, $to);