Numbered Steps to Reproduce Problem:
1.) Have at least two objects with KEEP_TOGETHER appearance flag on screen. In the example below it's obj/a and obj/b.
2.) At least one of those objects has an overlay that uses that object as a render_target in a filter. In the example below it's im created in New.
3.) Possibly wait a while for the bug to appear. In the minimal example attached below it appears with 100% consistency however.
Code Snippet (if applicable) to Reproduce Problem:
obj
appearance_flags = KEEP_TOGETHER
icon = 'icons.dmi'
New()
render_target = "\ref[src]"
var/image/im = image('icons.dmi', icon_state="blue")
im.filters += filter(type="alpha", render_source=render_target)
overlays += im
a
icon_state = "a"
b
icon_state = "b"
Expected Results:
obj/a is displayed with an overlay with icon_state "blue" masked to the shape of obj/a. Same with obj/b.
Actual Results:
obj/a is displayed with an overlay with icon_state "blue" masked to the shape of obj/b and not obj/a. obj/b doesn't have any visible overlays
Does the problem occur:
Every time? Or how often? Every time in the example attached above.
In other games? N/A
In other user accounts? Yes.
On other computers? Yes.
When does the problem NOT occur?
Removing the KEEP_TOGETHER flag makes the problem not occur. Displaying image/im not as an overlay but through different means also makes the problem not occur.
Did the problem NOT occur in any earlier versions? If so, what was the last version that worked? (Visit http://www.byond.com/download/build to download old versions for testing.)
I believe it's been occuring since the introduction of render targets.
Workarounds:
I guess not using overlays for this stuff but something else, like vis_contents.