Merge pull request #11841 from Crazylemon64/fix_cheaty_ghosts

Fixes an exploit allowing ghosts to teleport their bodies
This commit is contained in:
Fox McCloud
2019-08-11 16:41:43 -04:00
committed by GitHub
+4 -4
View File
@@ -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, "<span class='warning'>No area available.</span>")
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