From 1766134062a9ce59084fd29298823a75b38e33e3 Mon Sep 17 00:00:00 2001 From: Jordan Brown Date: Mon, 21 May 2018 17:31:02 -0400 Subject: [PATCH 1/2] Merge pull request #37943 from AutomaticFrenzy/patch/mind-over-matter Fix mindswap forcibly enabling ambient occlusion --- code/_onclick/hud/hud.dm | 4 +++- code/_onclick/hud/plane_master.dm | 1 + code/modules/client/preferences.dm | 4 +--- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/code/_onclick/hud/hud.dm b/code/_onclick/hud/hud.dm index a17c07357e..e4318059d6 100644 --- a/code/_onclick/hud/hud.dm +++ b/code/_onclick/hud/hud.dm @@ -196,7 +196,9 @@ screenmob.client.screen -= infodisplay for(var/thing in plane_masters) - screenmob.client.screen += plane_masters[thing] + var/obj/screen/plane_master/PM = plane_masters[thing] + PM.backdrop(screenmob) + screenmob.client.screen += PM hud_version = display_hud_version persistent_inventory_update(screenmob) diff --git a/code/_onclick/hud/plane_master.dm b/code/_onclick/hud/plane_master.dm index 84add465c6..d4559ed66d 100644 --- a/code/_onclick/hud/plane_master.dm +++ b/code/_onclick/hud/plane_master.dm @@ -29,6 +29,7 @@ blend_mode = BLEND_OVERLAY /obj/screen/plane_master/game_world/backdrop(mob/mymob) + filters = list() if(istype(mymob) && mymob.client && mymob.client.prefs && mymob.client.prefs.ambientocclusion) filters += AMBIENT_OCCLUSION diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index 231d375bb3..7eb1c25455 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -1537,9 +1537,7 @@ GLOBAL_LIST_EMPTY(preferences_datums) ambientocclusion = !ambientocclusion if(parent && parent.screen && parent.screen.len) var/obj/screen/plane_master/game_world/PM = locate(/obj/screen/plane_master/game_world) in parent.screen - PM.filters -= AMBIENT_OCCLUSION - if(ambientocclusion) - PM.filters += AMBIENT_OCCLUSION + PM.backdrop(parent.mob) if("save") save_preferences()