"Rear" Catenary sprites are drawn behind other items, such as vehicles.
The rear sprites are drawn over any vehicle on the tile, leading to poles, etc. appearing over the vehicle. As Road/tram catenary has no means of defining a bounding box size or position, there is no means the draw the sprites in the correct order.
Providing for bounding boxes, or forcing the "rear" sprite to always be under all others would fix this.
Steps to reproduce
Build a default tramway, or use an NRT NewGRF to build a road or tramway that has overhead catenary.
Run any road vehicle along the far lane of the road.
When the vehicle passes in front of part of the catenary (pole etc), the catenary sprite is visible over the vehicle sprite.
The text was updated successfully, but these errors were encountered:
I gave it a spin to fix, as can been seen by the above PR, but .. I found out that there are some .. special choices made for trams :) Basically, some sprites in OpenGFX have pylons on both sides of the track. In general, for isometric games, if you have a single sprite that has to go both over and under another sprite, there is no correct way of sorting that. Unless OpenTTD has tricks up its sleeve to deal with these situations (my knowledge about this is severely lacking, so I hope someone else can fill in that gap), there is no answer to this problem.
So I am afraid you will have to deal with this problem a bit longer ... sorry :(
Edit: okay, gathered more information. Turns out the idea is that the back sprite draws the pylons, but the front sprite does this again for the pylons in the front. This is currently not done in OpenGFX, which was confusing me. It is fine that the back sprite has the pylon too, of course, but the front sprite should at least have it. Otherwise it is indeed an impossible situation for sorting .. but if the idea is that both have them, nothing is wrong here. It is just that OpenGFX got it wrong.
The tramtracks.png in our source tree does seem to get it right, so there is that.