diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index a818a01764..1bc7552c3f 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -254,24 +254,43 @@ return 0 +// reset_perspective(thing) set the eye to the thing (if it's equal to current default reset to mob perspective) +// reset_perspective() set eye to common default : mob on turf, loc otherwise /mob/proc/reset_perspective(atom/A) if(client) - if(ismovableatom(A)) - client.perspective = EYE_PERSPECTIVE - client.eye = A + if(A) + if(ismovableatom(A)) + //Set the the thing unless it's us + if(A != src) + client.perspective = EYE_PERSPECTIVE + client.eye = A + else + client.eye = client.mob + client.perspective = MOB_PERSPECTIVE + else if(isturf(A)) + //Set to the turf unless it's our current turf + if(A != loc) + client.perspective = EYE_PERSPECTIVE + client.eye = A + else + client.eye = client.mob + client.perspective = MOB_PERSPECTIVE + else + //Do nothing else - if(isturf(loc) && (!A || loc == A)) + //Reset to common defaults: mob if on turf, otherwise current loc + if(isturf(loc)) client.eye = client.mob client.perspective = MOB_PERSPECTIVE else client.perspective = EYE_PERSPECTIVE - client.eye = A + client.eye = loc return 1 /mob/living/reset_perspective(atom/A) if(..()) update_sight() - if(client.eye != src) + if(client.eye && client.eye != src) var/atom/AT = client.eye AT.get_remote_view_fullscreens(src) else