It wouldn't happen with the normal trains. I
think I know what's happening and I
think it's possibly a bug in jgr (or maybe even a specific blitter, hence the question) but I'm not quite certain enough to want to pass it off as a "not my problem".
If it's a jgr bug rather than a set bug, you'd also see it on 16-sprite sets like CETS (
http://bundles.openttdcoop.org/cets/push/LATEST/) or possibly even sets which have tilting trains in curves - in the latter case, you'd see trains get stuck in tilted mode even after a curve.
The reason is that underneath those long vehicles lurks the kind of horror of which Lovecraft would be proud. Each locomotive or wagon is actually
3 vehicles, in an articulated consist. I use a technique Eddi created years ago, where you use the variable for relative curvature between two vehicles in a consist (intended, as far as I'm aware, for tilting units to show tilt graphics in curves) to swap between sprites. This means that:
- When going in a straight line (no curvature difference between vehicles), each of the 3 sections of a train displays its own front/middle/rear sprite, so as far as OpenTTD is aware it's rendering 3 vehicles with length <= 8 and so you avoid any graphical glitches with tunnels, foundations and bridges.
- When going round a corner (one section of the articulated unit has a different direction to the others) the front and rear sections swap to an invisible sprite, and the middle section swaps to a single long sprite representing an intermediate angle between the 8 standard directions.
- When going up/down a hill (sections have different Z co-ordinates) the front and rear sections again swap to invisible, and the middle to a single long sprite representing uphill and downhill graphics.
(For vehicles that are standard OpenTTD length or shorter, the front and rear sprites are always invisible and they only have a middle sprite, as this won't cause any of the glitches oversize sprites do)
It looks like in your game, the middle unit sprite for going round a corner is somehow getting cached and carried into the straight section. Weirdly this doesn't happen for the front/rear sections, which correctly pick up that the consist is now in a straight line and don't stick with the transparent sprite. This makes me think there is some kind of odd sprite caching going on, although maybe the callback for the middle unit is different enough to make the value be cached for only that result. Without (yet) having been able to reproduce it, it's difficult to see if this is something to do with my code or whether your instance of jgr has some kind of sprite optimisation not in regular OpenTTD or, indeed, in the Win64 0.39.0 I just downloaded. (Which makes me wonder if it's even down to the level of being configuration specific)
Possibly if you're able to upload your openttd.cfg, that might help me reproduce it?