mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-09 16:14:13 +00:00
Fixes AIs using their Station Holomap on other Z Levels (#34684)
This commit is contained in:
@@ -324,6 +324,8 @@ var/list/station_holomaps = list()
|
|||||||
if(user.hud_used && user.hud_used.holomap_obj)
|
if(user.hud_used && user.hud_used.holomap_obj)
|
||||||
watching_mob = user
|
watching_mob = user
|
||||||
var/turf/T = get_turf(user)
|
var/turf/T = get_turf(user)
|
||||||
|
if (isAI)
|
||||||
|
T = get_turf(watching_mob.client.eye)
|
||||||
bogus = 0
|
bogus = 0
|
||||||
if(!((HOLOMAP_EXTRA_STATIONMAP+"_[T.z]") in extraMiniMaps))
|
if(!((HOLOMAP_EXTRA_STATIONMAP+"_[T.z]") in extraMiniMaps))
|
||||||
bogus = 1
|
bogus = 1
|
||||||
@@ -345,12 +347,14 @@ var/list/station_holomaps = list()
|
|||||||
else
|
else
|
||||||
to_chat(user, "<span class='notice'>A hologram of the station appears before your eyes.</span>")
|
to_chat(user, "<span class='notice'>A hologram of the station appears before your eyes.</span>")
|
||||||
|
|
||||||
/obj/item/device/station_map/proc/update_holomap()
|
/obj/item/device/station_map/proc/update_holomap(var/isAI = FALSE)
|
||||||
if (!watching_mob || !watching_mob.client || !watching_mob.hud_used)
|
if (!watching_mob || !watching_mob.client || !watching_mob.hud_used)
|
||||||
return
|
return
|
||||||
watching_mob.client.images -= holomap_datum.station_map
|
watching_mob.client.images -= holomap_datum.station_map
|
||||||
holomap_datum.station_map.overlays.len = 0
|
holomap_datum.station_map.overlays.len = 0
|
||||||
var/turf/T = get_turf(src)
|
var/turf/T = get_turf(src)
|
||||||
|
if (isAI)
|
||||||
|
T = get_turf(watching_mob.client.eye)
|
||||||
if (lastZ != T.z)
|
if (lastZ != T.z)
|
||||||
lastZ = T.z
|
lastZ = T.z
|
||||||
bogus = 0
|
bogus = 0
|
||||||
|
|||||||
@@ -56,7 +56,7 @@
|
|||||||
ai.light_cameras()
|
ai.light_cameras()
|
||||||
|
|
||||||
if (ai.station_holomap)
|
if (ai.station_holomap)
|
||||||
ai.station_holomap.update_holomap()
|
ai.station_holomap.update_holomap(TRUE)
|
||||||
|
|
||||||
/mob/camera/aiEye/Move(NewLoc, Dir = 0, step_x = 0, step_y = 0, glide_size_override = 0)
|
/mob/camera/aiEye/Move(NewLoc, Dir = 0, step_x = 0, step_y = 0, glide_size_override = 0)
|
||||||
return 0
|
return 0
|
||||||
|
|||||||
Reference in New Issue
Block a user