Adds a sanity check to turf/proc/distance_cardinal()

This commit is contained in:
Nodrak
2013-04-06 22:42:19 -04:00
parent 2c3a67ae7e
commit e3bd345d66
+1
View File
@@ -298,6 +298,7 @@
// possible. It results in more efficient (CPU-wise) pathing
// for bots and anything else that only moves in cardinal dirs.
/turf/proc/Distance_cardinal(turf/t)
if(!src || !t) return 0
return abs(src.x - t.x) + abs(src.y - t.y)
/turf/proc/AdjacentTurfsSpace()