Merge pull request #4618 from Citadel-Station-13/upstream-merge-33951
[MIRROR] Fixes reset_perspective runtimes
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user