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
This commit is contained in:
vuonojenmustaturska
2018-09-09 11:33:58 +03:00
committed by oranges
parent f545683008
commit 823c722d0f
+5
View File
@@ -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()