{
"$type": "site.standard.document",
"bskyPostRef": {
"cid": "bafyreifv32nxc73lc5urz4sbsboqfjwicqjw3se6ch5xlydc2apfdp44ou",
"uri": "at://did:plc:i7budt2wflrcfy6jtvfocbix/app.bsky.feed.post/3meswoin7ar72"
},
"path": "/viewtopic.php?p=1278058#p1278058",
"publishedAt": "2026-02-14T10:59:37.000Z",
"site": "https://www.tt-forums.net",
"tags": [
"HGus"
],
"textContent": "I got it.\nFirst, you misinterpreted the formula.\nThe key is in line 1203: function _dir(from, to)\nThe pathfinder is searching adjacent tiles, so the only possible values are 1, -1, MapSizeX and -MapSizeX, which match directions NW, SE, NE and SW.\nFor some undocumented reason, this specific code only applies to tiles in Y direction, line 1066: if (parDistance > 1) branchs only if parDistance = MapSizeX.\n\nStatistics: Posted by HGus — 14 Feb 2026 10:59\n\n* * *",
"title": "OpenTTD AIs and Game Scripts • Re: Can somebody teach me tile arithmetic?",
"updatedAt": "2026-02-14T10:59:37.000Z"
}