This might make A* work better, since BS12 doesn't have diagonal movement.

This commit is contained in:
Uristqwerty
2012-01-15 04:07:06 -05:00
parent a16c53ce7a
commit 1f27f092a8
+1 -6
View File
@@ -136,12 +136,7 @@
L.Add(t)
return L
Distance(turf/t)
if(get_dist(src,t) == 1)
var/cost = (src.x - t.x) * (src.x - t.x) + (src.y - t.y) * (src.y - t.y)
cost *= (pathweight+t.pathweight)/2
return cost
else
return get_dist(src,t)
return abs(src.x - t.x) + abs(src.y - t.y)
AdjacentTurfsSpace()
var/L[] = new()
for(var/turf/t in oview(src,1))