mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-10 09:42:29 +00:00
[MIRROR] Fixes parallax runtimes when your eye is not a mob [MDB IGNORE] (#17394)
* Fixes parallax runtimes when your eye is not a mob (#71072) ## About The Pull Request Also properly supports passing no input into the update proc * Fixes parallax runtimes when your eye is not a mob Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
This commit is contained in:
@@ -198,7 +198,7 @@ GLOBAL_LIST_INIT(available_erp_ui_styles, list(
|
|||||||
|
|
||||||
/datum/hud/proc/eye_z_changed(atom/eye)
|
/datum/hud/proc/eye_z_changed(atom/eye)
|
||||||
SIGNAL_HANDLER
|
SIGNAL_HANDLER
|
||||||
update_parallax_pref(eye) // If your eye changes z level, so should your parallax prefs
|
update_parallax_pref() // If your eye changes z level, so should your parallax prefs
|
||||||
var/turf/eye_turf = get_turf(eye)
|
var/turf/eye_turf = get_turf(eye)
|
||||||
var/new_offset = GET_TURF_PLANE_OFFSET(eye_turf)
|
var/new_offset = GET_TURF_PLANE_OFFSET(eye_turf)
|
||||||
if(current_plane_offset == new_offset)
|
if(current_plane_offset == new_offset)
|
||||||
|
|||||||
@@ -83,11 +83,12 @@
|
|||||||
return FALSE
|
return FALSE
|
||||||
|
|
||||||
/datum/hud/proc/update_parallax_pref(mob/viewmob)
|
/datum/hud/proc/update_parallax_pref(mob/viewmob)
|
||||||
if(!viewmob.client)
|
var/mob/screen_mob = viewmob || mymob
|
||||||
|
if(!screen_mob.client)
|
||||||
return
|
return
|
||||||
remove_parallax(viewmob)
|
remove_parallax(screen_mob)
|
||||||
create_parallax(viewmob)
|
create_parallax(screen_mob)
|
||||||
update_parallax(viewmob)
|
update_parallax(screen_mob)
|
||||||
|
|
||||||
// This sets which way the current shuttle is moving (returns true if the shuttle has stopped moving so the caller can append their animation)
|
// This sets which way the current shuttle is moving (returns true if the shuttle has stopped moving so the caller can append their animation)
|
||||||
/datum/hud/proc/set_parallax_movedir(new_parallax_movedir = 0, skip_windups, mob/viewmob)
|
/datum/hud/proc/set_parallax_movedir(new_parallax_movedir = 0, skip_windups, mob/viewmob)
|
||||||
|
|||||||
Reference in New Issue
Block a user