[MIRROR] Fix ambient occlusion stacking [MDB IGNORE] (#8664)

* Fix ambient occlusion stacking (#61822)

Fixes filter not being removed and relays stacking up

* Fix ambient occlusion stacking

Co-authored-by: TiviPlus <57223640+TiviPlus@users.noreply.github.com>
This commit is contained in:
SkyratBot
2021-10-08 14:25:54 +02:00
committed by GitHub
parent 96979aabd4
commit 3701087507
2 changed files with 8 additions and 2 deletions

View File

@@ -13,6 +13,8 @@
var/generate_render_target = TRUE
///integer: blend mode to apply to the render relay in case you dont want to use the plane_masters blend_mode
var/blend_mode_override
///reference: current relay this plane is utilizing to render
var/atom/movable/render_plane_relay/relay
/atom/movable/screen/plane_master/proc/Show(override)
alpha = override || show_alpha
@@ -66,6 +68,7 @@
/atom/movable/screen/plane_master/game_world/backdrop(mob/mymob)
. = ..()
remove_filter("AO")
if(istype(mymob) && mymob.client?.prefs?.read_preference(/datum/preference/toggle/ambient_occlusion))
add_filter("AO", 1, drop_shadow_filter(x = 0, y = -2, size = 4, color = "#04080FAA"))
@@ -201,6 +204,7 @@
/atom/movable/screen/plane_master/runechat/backdrop(mob/mymob)
. = ..()
remove_filter("AO")
if(istype(mymob) && mymob.client?.prefs?.read_preference(/datum/preference/toggle/ambient_occlusion))
add_filter("AO", 1, drop_shadow_filter(x = 0, y = -2, size = 4, color = "#04080FAA"))