Fixes AI visiblity checks (#31819)

This commit is contained in:
YPOQ
2017-10-19 08:42:24 -02:00
committed by Leo
parent 165c9fb8fa
commit d943e07733
4 changed files with 24 additions and 25 deletions
+2 -2
View File
@@ -42,8 +42,8 @@ GLOBAL_DATUM_INIT(default_state, /datum/ui_state/default, new)
if(. < UI_INTERACTIVE)
return
// The AI can interact with anything it can see nearby, or with cameras.
if((get_dist(src, src_object) <= client.view) || GLOB.cameranet.checkTurfVis(get_turf_pixel(src_object)))
// The AI can interact with anything it can see nearby, or with cameras while wireless control is enabled.
if(!control_disabled && can_see(src_object))
return UI_INTERACTIVE
return UI_CLOSE