Merge pull request #29245 from MrStonedOne/patch-394

Fixes astar pathing thru space when requested not to.
This commit is contained in:
Jordan Brown
2017-07-14 17:17:57 -04:00
committed by GitHub
+2 -1
View File
@@ -154,10 +154,11 @@ Actual Adjacent procs :
/turf/proc/reachableAdjacentTurfs(caller, ID, simulated_only)
var/list/L = new()
var/turf/T
var/static/space_type_cache = typecacheof(list(/turf/open/space))
for(var/dir in GLOB.cardinals)
T = get_step(src,dir)
if(simulated_only && !istype(T))
if(!T || (simulated_only && space_type_cache[T.type]))
continue
if(!T.density && !LinkBlockedWithAccess(T,caller, ID))
L.Add(T)