mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-31 09:08:30 +01:00
Adds a game option to toggle the MultiZ parallax effect for a player (#71005)
Adds a game option, similar to Ambient Occlusion, to toggle MultiZ scaling, ie the MultiZ parallax effect, which I'm calling it in the option since that's more clear. I mainly am curious if this is the cause of significant lag on icebox, or if it's just the use of a huge number of planes in general. I don't experience any client lag locally (I'm guessing lemon doesn't either) so **I mainly intend this to be Test Merged** for people to find out if the the actual plane.transform being set is the cause.
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
/// Whether or not to toggle multiz parallax, the parallax effect for lower z-levels.
|
||||
/datum/preference/toggle/multiz_parallax
|
||||
category = PREFERENCE_CATEGORY_GAME_PREFERENCES
|
||||
savefile_key = "multiz_parallax"
|
||||
savefile_identifier = PREFERENCE_PLAYER
|
||||
|
||||
/datum/preference/toggle/multiz_parallax/apply_to_client(client/client, value)
|
||||
// Update the plane master group's Z transforms.
|
||||
|
||||
var/datum/hud/my_hud = client.mob?.hud_used
|
||||
if(!my_hud)
|
||||
return
|
||||
|
||||
for(var/group_key as anything in my_hud.master_groups)
|
||||
var/datum/plane_master_group/group = my_hud.master_groups[group_key]
|
||||
group.transform_lower_turfs(my_hud, my_hud.current_plane_offset)
|
||||
Reference in New Issue
Block a user