PHP Code:
function checkPath(ox, tx, oy, ty) {
temp.nxy = {(tx + 23.5/16) - (ox + 23.5/16)
(ty + 31.5/16) - (oy + 31.5/16)};
temp.dist = (nxy[0]*nxy[0] + nxy[1]*nxy[1])^0.5;
temp.ow = false;
for(temp.i = 0; i < dist; i ++) {
if (onwall2((ox + 23.5/16) + ((nxy[0]/dist) * i),
(oy + 31.5/16) + ((nxy[1]/dist) * i), 0.5, 0.5)) {
ow = true;
break;
}
i ++;
}
return ow;
}
wee