ID:2904735
 
Resolved
Particles did not work correctly on objects using VIS_INHERIT_ID, since the wrong object was being looked up for the particle stream info.
BYOND Version:515.1621
Operating System:Windows 10 Pro
Web Browser:Firefox 120.0
Applies to:Dream Seeker
Status: Resolved (515.1622)

This issue has been resolved.
Descriptive Problem Summary:

Adding an object with VIS_INHERIT_ID vis_flag to another object's vis_contents causes the particles of that object to disappear/not work.

Numbered Steps to Reproduce Problem:
1. Have an object with particles attached and VIS_INHERIT_ID vis_flag
2. Attach it to another object's vis_contents
3. Observe no particles

Code Snippet (if applicable) to Reproduce Problem:
/particles/test
spawning = 2
velocity = generator("circle", 1, 3)

/obj/bottom
icon = 'test.dmi'
icon_state = "1"

/obj/bottom/New()
var/obj/top = new/obj/top
top.pixel_y = 32
vis_contents += top

/obj/bottom/vis_inherit/New()
var/obj/top = new/obj/top
top.pixel_y = 32
top.vis_flags = VIS_INHERIT_ID
vis_contents += top

/obj/top
icon = 'test.dmi'
icon_state = "2"
particles = new/particles/test


Test project link: https://cdn.discordapp.com/attachments/514125702954745857/ 1187168269002608680/vis_inherit_id.zip

Expected Results:
Visible particles.

Actual Results:
No particles visible.

When does the problem occur:
Every time.

When does the problem NOT occur?
So far it seems to always 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 don't know whether it was working in earlier versions.

Workarounds:
Avoiding the VIS_INHERIT_ID flag.
I see what's happening here. The object lookup for the particle stream is being done at a latest phase in GetMapIcons(), when instead it should be carrying over from an earlier step, and so it's looking up particles on the wrong object.
Lummox JR resolved issue with message:
Particles did not work correctly on objects using VIS_INHERIT_ID, since the wrong object was being looked up for the particle stream info.