Re-allowed turn-based mesh

Current version is still using distance-based, but turn-based can be
turned on by editing the calc_cost function.