Skip to content

Commit

Permalink
Stop pathing into space please
Browse files Browse the repository at this point in the history
  • Loading branch information
morrowwolf committed Nov 1, 2023
1 parent a367c55 commit d180060
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion code/__DEFINES/xeno_ai.dm
Original file line number Diff line number Diff line change
Expand Up @@ -86,4 +86,4 @@ PROBABILITY CALCULATIONS ARE HERE


/// Special blockers for pathfinding or obstacle handling
#define XENO_AI_SPECIAL_BLOCKERS list(/obj/flamer_fire, /obj/vehicle/multitile)
#define XENO_AI_SPECIAL_BLOCKERS list(/obj/flamer_fire, /obj/vehicle/multitile, /turf/open/space)
6 changes: 3 additions & 3 deletions code/controllers/subsystem/pathfinding.dm
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,10 @@ SUBSYSTEM_DEF(xeno_pathfinding)
/datum/controller/subsystem/xeno_pathfinding/proc/check_special_blockers(mob/living/carbon/xenomorph/xeno, turf/checking_turf)
var/list/pass_back = list()

pass_back += (checking_turf.type in XENO_AI_SPECIAL_BLOCKERS) ? checking_turf : list()

for(var/atom/checked_atom as anything in checking_turf)
for(var/special_block in XENO_AI_SPECIAL_BLOCKERS)
if(istype(checked_atom, special_block))
pass_back += checked_atom
pass_back += (checked_atom.type in XENO_AI_SPECIAL_BLOCKERS) ? checked_atom : list()

return pass_back

Expand Down

0 comments on commit d180060

Please sign in to comment.