Loading

Revision differences

Old revision #p55s04cofNew revision #piwcihsrz
4    local t0y = AIMap.GetTileY(t0);  4    local t0y = AIMap.GetTileY(t0);  
5    local t1x = AIMap.GetTileX(t1);  5    local t1x = AIMap.GetTileX(t1);  
6    local t1y = AIMap.GetTileY(t1);  6    local t1y = AIMap.GetTileY(t1);  
7    local dx = t0x > t1x ? t0x - t1x : t1x - t0x;  // 20 - 10 = 10  7    local dx = t0x > t1x ? t0x - t1x : t1x - t0x;
8    local dy = t0y > t1y ? t0y - t1y : t1y - t0y;  // 37 - 30 = 7  8    local dy = t0y > t1y ? t0y - t1y : t1y - t0y;
9    return dxy = dx > dy ? (dx - dy) * 48 / 4 + dy * 48 / 3 : (dy - dx) * 48 / 4 + dx * 48 / 3;  9    return dxy = dx > dy ? (dx - dy) * 48 / 4 + dy * 48 / 3 : (dy - dx) * 48 / 4 + dx * 48 / 3;  
10} 10}