mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-21 12:09:43 +00:00
jump test for pathfinder
This commit is contained in:
parent
d0ec32dc02
commit
dd4264998d
5 changed files with 28 additions and 15 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue