From 6e3335c269fd90cc434957c3a7ceaf0be59ac767 Mon Sep 17 00:00:00 2001 From: Crazylemon64 Date: Fri, 12 Jul 2019 18:45:57 -0600 Subject: [PATCH] Fixes an exploit allowing ghosts to teleport their bodies --- code/modules/mob/dead/observer/observer.dm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index 2d1ff8d82da..731f53c7838 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -405,7 +405,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp A.on_close(CALLBACK(src, .proc/teleport)) /mob/dead/observer/proc/teleport(area/thearea) - if(!thearea) + if(!thearea || !isobserver(usr)) return var/list/L = list() @@ -416,7 +416,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp to_chat(usr, "No area available.") return - usr.forceMove(pick(L)) + forceMove(pick(L)) following = null /mob/dead/observer/verb/follow() @@ -430,7 +430,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp // This is the ghost's follow verb with an argument /mob/dead/observer/proc/ManualFollow(var/atom/movable/target) - if(!target) + if(!target || !isobserver(usr)) return if(!get_turf(target)) @@ -504,7 +504,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp A.on_close(CALLBACK(src, .proc/jump_to_mob)) /mob/dead/observer/proc/jump_to_mob(mob/M) - if(!M) + if(!M || !isobserver(usr)) return var/mob/A = src //Source mob var/turf/T = get_turf(M) //Turf of the destination mob