Descriptive Problem Summary:
When an object with FLOAT_PLANE/FLOAT_LAYER is added to the vis_contents of an object with FLOAT_PLANE/FLOAT_LAYER, which is in the vis_contents of an object with a specific plane/layer, the floating behavior does not conform to the top-level object's plane/layer as one would expect.
This causes components of components to become mislayered when rendered.
Object A has layer of 1, and plane of 2.
Object B has layer of FLOAT_LAYER, and plane of FLOAT_PLANE.
Object C has layer of FLOAT_LAYER, and plane of FLOAT_PLANE.
They are nested via vis contents:
A{B{C}}
A renders properly.
B renders properly.
C renders beneath A.
One would expect, that C would use A's layer/plane for rendering, given that C is inside of B, which defers to A for layer/plane. Instead, FLOAT_LAYER/FLOAT_PLANE only attempt to look to the parent for layering, rather than the last explicit plane/layer being carried down the visual hierarchy, which in my opinion, would be the correct behavior.
ID:2337799
Jan 16 2018, 4:49 am (Edited on Jan 16 2018, 4:54 am)
|
|||||||||||||
Resolved
| |||||||||||||
Lummox JR resolved issue with message:
FLOAT_PLANE didn't work correctly in multiply-nested cases. |
In response to Ter13
|
|
Huh. But the test case I created in my debug project shows the correct behavior now.
mob/verb/Planes() What cases does this fail on currently? Or better still, is there a quick test project to show it? |
I cut out all the unnecessary crap from the project I was seeing this in. This is a minimal test case. If you need me to explain how things work, just hit me up via PM. I'll explain why it's designed the way it is.
http://files.byondhome.com/Ter13/TestFloat_src.zip Also, there's a bonus in there for you. I never made the report properly, but the new screen_loc flags for LEFT,TOP,BOTTOM,RIGHT, etc. have never worked since the first release. Read the comments in my test project. I've left a couple lines for you to mess with to demonstrate the issue. |
For the main bug, I found a couple of issues. First, screen objects were not calling Unfloat() in the correct way, which effectively acted like it wasn't called at all. Second, and this is a legacy issue, Unfloat() never liked working with layer=0 and wasn't prepared to handle it properly. Since I can't see a reason for an old project to be using layer=0 and the changed behavior is better and more consistent, I'm making the change.
I see the issue with the screen edge coordinates, and that's gonna take longer to fix. I have to rethink how I'm handling those coords so they work properly in sub-icons. |
If by any chance you can whip up a quick demo that would be helpful. I can investigate myself in a test project if not though.