Vinifera
Vinifera copied to clipboard
[Vanilla Bug] Units at adjacent horizontal cells are layered incorrectly
First Check
- [X] I added a very descriptive title to this issue.
- [X] I used the GitHub search to find a similar issue and didn't find it.
- [X] I have attached as much information as possible (screenshots, debug and exception logs, etc).
Description
When units are preplaced on or enter adjacent horizontal* cells, the top-left unit (lower X coordinate) will sometimes visually overlap with the bottom-right unit (higher X coordinate), even though it should be the opposite.
*in this context horizontal means ingame east-west, or top-left–bottom-right in the player's view
Quoting LKO from PPM:
It seems the layer order is only updated, once the unit leaves a cell, not when it enters a cell. This bug is also noticeable when creating a map. The order at which 2 adjacent units are added to the [Units] list, changes the render layer order ingame. e.g.
[Units]
0=Special,LOCOMOTIVE,256,451,52,64,Guard,None,0,-1,0,1,1,0
1=Special,WAGON,256,450,52,64,Guard,None,0,-1,0,2,1,0
is different than
[Units]
0=Special,WAGON,256,450,52,64,Guard,None,0,-1,0,2,1,0
1=Special,LOCOMOTIVE,256,451,52,64,Guard,None,0,-1,0,1,1,0
Source: Project Perfect Mod
Required Code (optional)
No response
Steps To Reproduce
See the description or the attached gif on how to reproduce the issue.
Expected Behaviour
The top-left unit should always appear behind the bottom-left unit.
Actual Behaviour
The top-left unit appears in front of the bottom-left unit, depending on the circumstances.
Additional Context
Example of the bug.
Demonstrating how units align properly on the vertical (north-south) axis.