[MIRROR] Fixing client eye (#11812)

Co-authored-by: Will <7099514+Willburd@users.noreply.github.com>
Co-authored-by: Cameron Lennox <killer65311@gmail.com>
This commit is contained in:
CHOMPStation2StaffMirrorBot
2025-10-12 19:44:25 -07:00
committed by GitHub
parent b9db7ed21f
commit 7d57273375
95 changed files with 762 additions and 710 deletions

View File

@@ -78,13 +78,10 @@
user.visible_message("[user] climbs on \the [src].","You climb on \the [src].")
else
visible_message(span_notice("\The [C] has been laid on \the [src] by [user]."))
if(C.client)
C.client.perspective = EYE_PERSPECTIVE
C.client.eye = src
if(C.pulledby)
C.pulledby.stop_pulling()
C.resting = 1
C.loc = src.loc
C.forceMove(get_turf(src))
for(var/obj/O in src)
O.loc = src.loc
add_fingerprint(user)

View File

@@ -479,9 +479,6 @@
to_chat(user, span_warning("\The [src] is already occupied."))
return
M.stop_pulling()
if(M.client)
M.client.perspective = EYE_PERSPECTIVE
M.client.eye = src
M.forceMove(src)
update_use_power(USE_POWER_ACTIVE)
occupant = M
@@ -493,9 +490,6 @@
occupant.cozyloop.stop() // CHOMPStation Add: Cozy Music
occupant = null // JUST IN CASE
return
if(occupant.client)
occupant.client.eye = occupant.client.mob
occupant.client.perspective = MOB_PERSPECTIVE
occupant.Stasis(0)
occupant.forceMove(get_turf(src))
occupant.cozyloop.stop() // CHOMPStation Add: Cozy Music

View File

@@ -124,10 +124,7 @@
/obj/machinery/bodyscanner/proc/go_out()
if ((!(occupant) || src.locked))
return
if (occupant.client)
occupant.client.eye = occupant.client.mob
occupant.client.perspective = MOB_PERSPECTIVE
occupant.forceMove(src.loc) // was occupant.loc = src.loc, but that doesn't trigger exit(), and thus recursive radio listeners forwarded messages to the occupant as if they were still inside it for the rest of the round! OP21 #5f88307 Port
occupant.forceMove(get_turf(src))
occupant = null
update_icon() //icon_state = "body_scanner_1" //VOREStation Edit - Health display for consoles with light and such.
SStgui.update_uis(src)
@@ -137,7 +134,7 @@
switch(severity)
if(1.0)
for(var/atom/movable/A as mob|obj in src)
A.forceMove(src.loc)
A.forceMove(get_turf(src))
ex_act(severity)
//Foreach goto(35)
//SN src = null
@@ -146,7 +143,7 @@
if(2.0)
if (prob(50))
for(var/atom/movable/A as mob|obj in src)
A.forceMove(src.loc)
A.forceMove(get_turf(src))
ex_act(severity)
//Foreach goto(108)
//SN src = null
@@ -155,7 +152,7 @@
if(3.0)
if (prob(25))
for(var/atom/movable/A as mob|obj in src)
A.forceMove(src.loc)
A.forceMove(get_turf(src))
ex_act(severity)
//Foreach goto(181)
//SN src = null

View File

@@ -319,9 +319,6 @@
if(!(occupant))
return
if(occupant.client)
occupant.client.eye = occupant.client.mob
occupant.client.perspective = MOB_PERSPECTIVE
occupant.forceMove(get_turf(src))
eject_wait = 0 //If it's still set somehow.
if(ishuman(occupant)) //Need to be safe.

View File

@@ -153,7 +153,7 @@
update_icon()
if("ejectBeaker")
if(beaker)
beaker.loc = get_step(src.loc, SOUTH)
beaker.forceMove(get_step(src.loc, SOUTH))
beaker = null
update_icon()
if("ejectOccupant")
@@ -173,7 +173,7 @@
beaker = G
user.drop_item()
G.loc = src
G.forceMove(src)
user.visible_message("[user] adds \a [G] to \the [src]!", "You add \a [G] to \the [src]!")
SStgui.update_uis(src)
update_icon()
@@ -261,15 +261,10 @@
/obj/machinery/atmospherics/unary/cryo_cell/proc/go_out()
if(!(occupant))
return
//for(var/obj/O in src)
// O.loc = src.loc
if(occupant.client)
occupant.client.eye = occupant.client.mob
occupant.client.perspective = MOB_PERSPECTIVE
vis_contents -= occupant
occupant.pixel_x = occupant.default_pixel_x
occupant.pixel_y = occupant.default_pixel_y
occupant.loc = get_step(src.loc, SOUTH) //this doesn't account for walls or anything, but i don't forsee that being a problem.
occupant.forceMove(get_step(src.loc, SOUTH)) //this doesn't account for walls or anything, but i don't forsee that being a problem.
if(occupant.bodytemperature < 261 && occupant.bodytemperature >= 70) //Patch by Aranclanos to stop people from taking burn damage after being ejected
occupant.bodytemperature = 261 // Changed to 70 from 140 by Zuhayr due to reoccurance of bug.
unbuckle_mob(occupant, force = TRUE)
@@ -296,11 +291,8 @@
if(!node)
to_chat(usr, span_warning("The cell is not correctly connected to its pipe network!"))
return
if(M.client)
M.client.perspective = EYE_PERSPECTIVE
M.client.eye = src
M.stop_pulling()
M.loc = src
M.forceMove(src)
M.extinguish_mob()
if(M.health > -100 && (M.health < 0 || M.sleeping))
to_chat(M, span_boldnotice("You feel a cold liquid surround you. Your skin starts to freeze up."))

View File

@@ -639,8 +639,6 @@
return
usr.stop_pulling()
usr.client.perspective = EYE_PERSPECTIVE
usr.client.eye = src
usr.forceMove(src)
set_occupant(usr)
if(ishuman(usr) && applies_stasis)
@@ -676,9 +674,6 @@
if(!occupant)
return
if(occupant.client)
occupant.client.eye = occupant.client.mob
occupant.client.perspective = MOB_PERSPECTIVE
if(!skip_move)
occupant.forceMove(get_turf(src))
if(ishuman(occupant) && applies_stasis)
@@ -731,10 +726,6 @@
to_chat(user, span_warning("\The [src] is already occupied."))
return
M.forceMove(src)
if(M.client)
M.client.perspective = EYE_PERSPECTIVE
M.client.eye = src
else return
icon_state = occupied_icon_state

View File

@@ -153,9 +153,8 @@ Class Procs:
for(var/atom/A in contents)
if(ishuman(A))
var/mob/living/carbon/human/H = A
H.client.eye = H.client.mob
H.client.perspective = MOB_PERSPECTIVE
H.loc = src.loc
H.forceMove(loc)
H.reset_perspective()
else
qdel(A)
return ..()
@@ -239,7 +238,7 @@ Class Procs:
if(isrobot(user))
// For some reason attack_robot doesn't work
// This is to stop robots from using cameras to remotely control machines.
if(user.client && user.client.eye == user)
if(user.client && !user.is_remote_viewing())
return attack_hand(user)
else
return attack_hand(user)

View File

@@ -266,7 +266,6 @@
return
add_fingerprint(R)
R.reset_view(src)
R.forceMove(src)
occupant = R
update_icon()
@@ -280,7 +279,6 @@
return
add_fingerprint(P)
P.reset_view(src)
P.forceMove(src)
occupant = P
update_icon()
@@ -291,7 +289,6 @@
var/mob/living/carbon/human/H = L
if(H.isSynthetic() || H.wearing_rig)
add_fingerprint(H)
H.reset_view(src)
H.forceMove(src)
occupant = H
update_icon()
@@ -302,9 +299,7 @@
/obj/machinery/recharge_station/proc/go_out()
if(!occupant)
return
occupant.forceMove(src.loc)
occupant.reset_view()
occupant.forceMove(get_turf(src))
occupant = null
update_icon()

View File

@@ -165,10 +165,7 @@ GLOBAL_LIST_EMPTY(suit_cycler_typecache)
if(do_after(user, 2 SECONDS, target = src))
if(!G || !G.affecting) return
var/mob/M = G.affecting
if(M.client)
M.client.perspective = EYE_PERSPECTIVE
M.client.eye = src
M.loc = src
M.forceMove(src)
occupant = M
add_fingerprint(user)
@@ -213,7 +210,7 @@ GLOBAL_LIST_EMPTY(suit_cycler_typecache)
to_chat(user, "You fit \the [I] into the suit cycler.")
user.drop_item()
I.loc = src
I.forceMove(src)
helmet = I
update_icon()
@@ -252,7 +249,7 @@ GLOBAL_LIST_EMPTY(suit_cycler_typecache)
to_chat(user, "You fit \the [I] into the suit cycler.")
user.drop_item()
I.loc = src
I.forceMove(src)
suit = I
update_icon()
@@ -502,11 +499,7 @@ GLOBAL_LIST_EMPTY(suit_cycler_typecache)
if(!occupant)
return
if(occupant.client)
occupant.client.eye = occupant.client.mob
occupant.client.perspective = MOB_PERSPECTIVE
occupant.loc = get_turf(occupant)
occupant.forceMove(get_turf(src))
occupant = null
add_fingerprint(user)

View File

@@ -188,7 +188,7 @@
if(!HELMET)
return //Do I even need this sanity check? Nyoro~n
else
HELMET.loc = src.loc
HELMET.forceMove(get_turf(src))
HELMET = null
return
@@ -197,7 +197,7 @@
if(!SUIT)
return
else
SUIT.loc = src.loc
SUIT.forceMove(get_turf(src))
SUIT = null
return
@@ -206,7 +206,7 @@
if(!MASK)
return
else
MASK.loc = src.loc
MASK.forceMove(get_turf(src))
MASK = null
return
@@ -214,13 +214,13 @@
/obj/machinery/suit_storage_unit/proc/dump_everything()
islocked = 0 //locks go free
if(SUIT)
SUIT.loc = src.loc
SUIT.forceMove(get_turf(src))
SUIT = null
if(HELMET)
HELMET.loc = src.loc
HELMET.forceMove(get_turf(src))
HELMET = null
if(MASK)
MASK.loc = src.loc
MASK.forceMove(get_turf(src))
MASK = null
if(OCCUPANT)
eject_occupant(OCCUPANT)
@@ -321,10 +321,7 @@
to_chat(OCCUPANT, span_notice("The machine kicks you out!"))
if(user.loc != src.loc)
to_chat(OCCUPANT, span_notice("You leave the not-so-cozy confines of the SSU."))
OCCUPANT.client.eye = OCCUPANT.client.mob
OCCUPANT.client.perspective = MOB_PERSPECTIVE
OCCUPANT.loc = src.loc
OCCUPANT.forceMove(get_turf(src))
OCCUPANT = null
if(!isopen)
isopen = 1
@@ -364,9 +361,7 @@
visible_message(span_info("[usr] starts squeezing into the suit storage unit!"), 3)
if(do_after(usr, 1 SECOND, target = src))
usr.stop_pulling()
usr.client.perspective = EYE_PERSPECTIVE
usr.client.eye = src
usr.loc = src
usr.forceMove(src)
OCCUPANT = usr
isopen = 0 //Close the thing after the guy gets inside
update_icon()
@@ -403,10 +398,7 @@
if(do_after(user, 2 SECONDS, target = src))
if(!G || !G.affecting) return //derpcheck
var/mob/M = G.affecting
if(M.client)
M.client.perspective = EYE_PERSPECTIVE
M.client.eye = src
M.loc = src
M.forceMove(src)
OCCUPANT = M
isopen = 0 //close ittt
@@ -424,7 +416,7 @@
return
to_chat(user, span_info("You load the [S.name] into the storage compartment."))
user.drop_item()
S.loc = src
S.forceMove(src)
SUIT = S
update_icon()
return
@@ -437,7 +429,7 @@
return
to_chat(user, span_info("You load the [H.name] into the storage compartment."))
user.drop_item()
H.loc = src
H.forceMove(src)
HELMET = H
update_icon()
return
@@ -450,7 +442,7 @@
return
to_chat(user, span_info("You load the [M.name] into the storage compartment."))
user.drop_item()
M.loc = src
M.forceMove(src)
MASK = M
update_icon()
return

View File

@@ -58,7 +58,6 @@
return
add_fingerprint(O)
O.reset_view(src)
O.forceMove(src)
occupant = O
update_icon()
@@ -72,9 +71,7 @@
/obj/machinery/transportpod/proc/go_out()
if(!occupant)
return
occupant.forceMove(src.loc)
occupant.reset_view()
occupant = null
update_icon()

View File

@@ -65,9 +65,6 @@
avatar.exit_vr() //We don't poof! We're a actual, living entity that isn't restrained by VR zones!
if(!occupant) //This whole thing needs cleaned up later, but this works for now.
return
if(occupant && occupant.client)
occupant.client.eye = occupant.client.mob
occupant.client.perspective = MOB_PERSPECTIVE
occupant.forceMove(get_turf(src))
occupant.vr_link = null //The machine remembers the avatar. 1 avatar per machine. So the vr_link isn't needed anymore.
occupant = null

View File

@@ -3,6 +3,7 @@
desc = "A fancy bed with built-in sensory I/O ports and connectors to interface users' minds with their bodies in virtual reality."
icon = 'icons/obj/Cryogenic2.dmi'
icon_state = "body_scanner_0"
flags = REMOTEVIEW_ON_ENTER
var/base_state = "body_scanner_"
@@ -186,10 +187,7 @@
to_chat(user, span_warning("\The [src] is already occupied."))
return
M.stop_pulling()
if(M.client)
M.client.perspective = EYE_PERSPECTIVE
M.client.eye = src
M.loc = src
M.forceMove(src)
occupant = M
update_icon()
@@ -221,9 +219,7 @@
if(occupant.vr_link)
occupant.vr_link.exit_vr(FALSE)
if(occupant.client)
occupant.client.eye = occupant.client.mob
occupant.client.perspective = MOB_PERSPECTIVE
occupant.reset_perspective() // Needed for returning from VR
occupant.forceMove(get_turf(src))
occupant = null
for(var/atom/movable/A in src) // In case an object was dropped inside or something
@@ -231,7 +227,7 @@
continue
if(A in component_parts)
continue
A.loc = src.loc
A.forceMove(get_turf(src))
update_use_power(USE_POWER_IDLE)
update_icon()