Skip to content

Commit

Permalink
update locations
Browse files Browse the repository at this point in the history
immediately update internal camera / eye location on mech enter / leave
  • Loading branch information
DeltaFire15 committed Dec 12, 2024
1 parent 82175eb commit e5008de
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions code/game/mecha/mecha.dm
Original file line number Diff line number Diff line change
Expand Up @@ -841,6 +841,10 @@
GrantActions(AI, FALSE) //No eject/return to core action for AI uploaded by card
else
GrantActions(AI, !AI.can_dominate_mechs)
//NSV13 - immediately update camera info on connect.
AI.eyeobj?.setLoc(get_turf(src), FALSE, null, TRUE)
AI.update_camera_location()
//NSV13 end.


//An actual AI (simple_animal mecha pilot) entering the mech
Expand Down Expand Up @@ -1106,6 +1110,12 @@
icon_state = initial(icon_state)+"-open"
setDir(dir_in)

//NSV13 - immediately update core camera with old core location.
if(isAI(mob_container))
var/mob/living/silicon/ai/leaving_ai = mob_container
leaving_ai.update_camera_location(src)
//NSV13 end.

if(L?.client)
L.update_mouse_pointer()
L.client.view_size.resetToDefault()
Expand Down

0 comments on commit e5008de

Please sign in to comment.