@@ -180,13 +180,13 @@ static uint NPFTunnelCost(AyStarNode* cu
return NPF_TILE_LENGTH;
}
static uint NPFSlopeCost(AyStarNode* current)
{
TileIndex next = current->tile + TileOffsByDir(TrackdirToExitdir(current->direction));
TileIndex next = current->tile + TileOffsByDiagDir(TrackdirToExitdir(current->direction));
int x,y;
int8 z1,z2;
x = TileX(current->tile) * TILE_SIZE;
y = TileY(current->tile) * TILE_SIZE;
/* get the height of the center of the current tile */