From 823c722d0fbbab9ea7c550b8db7b2d4e050df308 Mon Sep 17 00:00:00 2001 From: vuonojenmustaturska Date: Sun, 9 Sep 2018 11:33:58 +0300 Subject: [PATCH] Fix orbit-causing verbs breaking sounds for ghosts that jump between z-levels as a result of an orbit update (#40172) fix: ghosts will no longer lose their hearing from jumping between z-levels via orbiting --- code/modules/orbit/orbit.dm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/code/modules/orbit/orbit.dm b/code/modules/orbit/orbit.dm index e62b53604a0..79685b91040 100644 --- a/code/modules/orbit/orbit.dm +++ b/code/modules/orbit/orbit.dm @@ -55,6 +55,11 @@ if (!targetloc || (!lock && orbiter.loc != lastloc && orbiter.loc != targetloc)) orbiter.stop_orbit() return + var/turf/old_turf = get_turf(orbiter) + var/turf/new_turf = get_turf(targetloc) + if (old_turf?.z != new_turf?.z) + orbiter.onTransitZ(old_turf?.z, new_turf?.z) + // DO NOT PORT TO FORCEMOVE - MEMECODE WILL KILL MC orbiter.loc = targetloc orbiter.update_parallax_contents() orbiter.update_light()