fixed up stuff. added mapPercent[x][y][direction]