From ba07ebeb3057d40e500ce0a9f6ad310766bfc7f4 Mon Sep 17 00:00:00 2001 From: Kano <89972582+kano-dot@users.noreply.github.com> Date: Wed, 14 Jan 2026 20:01:07 +0300 Subject: [PATCH] Fixes AI eye being unable to traverse Z-levels (#21708) ## About PR Fixes a bug introduced in #21626. I misunderstood the purpose of a check which was allowing eyeobjects to Z-travel, my bad! - Fixes #21695 --- code/modules/mob/abstract/freelook/eye.dm | 2 +- code/modules/multiz/movement.dm | 5 +++++ html/changelogs/kano-dot-look-me-in-the-eye.yml | 6 ++++++ 3 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 html/changelogs/kano-dot-look-me-in-the-eye.yml diff --git a/code/modules/mob/abstract/freelook/eye.dm b/code/modules/mob/abstract/freelook/eye.dm index 1458e97390b..0e95bf88024 100644 --- a/code/modules/mob/abstract/freelook/eye.dm +++ b/code/modules/mob/abstract/freelook/eye.dm @@ -150,7 +150,7 @@ sprint = initial return 1 -// If the eye movement needs to be restricted by any means, override this +/// If the eye movement needs to be restricted by any additional means, override this. /mob/abstract/eye/proc/check_allowed_movement(turf/step) return TRUE diff --git a/code/modules/multiz/movement.dm b/code/modules/multiz/movement.dm index b8544bcf296..edfc57ee8e6 100644 --- a/code/modules/multiz/movement.dm +++ b/code/modules/multiz/movement.dm @@ -31,6 +31,11 @@ * FALSE otherwise. */ /mob/proc/zMove(direction) + // If the calling mob has an active eyeobj reference, we move it instead. + // This is important because zMove is called from the actual mob and not the eyeobj they're controlling. + if(eyeobj) + return eyeobj.zMove(direction) + // Check if we can actually travel a Z-level. if (!can_ztravel(direction)) to_chat(src, SPAN_WARNING("You lack means of travel in that direction.")) diff --git a/html/changelogs/kano-dot-look-me-in-the-eye.yml b/html/changelogs/kano-dot-look-me-in-the-eye.yml new file mode 100644 index 00000000000..f2c31afa036 --- /dev/null +++ b/html/changelogs/kano-dot-look-me-in-the-eye.yml @@ -0,0 +1,6 @@ +author: Kano + +delete-after: True + +changes: + - bugfix: "Fixed an issue preventing the AI eye from traversing Z-levels."