News:

Simutrans Tools
Know our tools that can help you to create add-ons, install and customize Simutrans.

r12041+: switching graphics are broken

Started by Nazalassa, Yesterday at 04:54:22 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Nazalassa

Since r12041, switches no longer use their switching graphics.

and... yey attachments are down. files.simutrans-germany.com does not allow .patch files. so the patch is on the translator... https://simutrans.net/victor_18993/switch-graphics.patch
Making paks since October 2023  |  pak48.bitlit | pak32.box | MLM for pak64 | Empire F7 cars | Pneumatic tubes | More pak64 vehicles and industries

Life is like a multi-tasking OS: you know you'll eventually get back to everything, but you don't know when.


victor_18993

Thanks for the report and for providing the patch.

We are currently reviewing the regression and comparing the behaviour around r12040/r12041 to confirm the exact cause and make sure the proposed fix does not affect any of the later switching or routing logic.
I'll post an update here once the reproduction and tests are complete.
En la vida todo son vivencias y cada una de ellas nos hace mas grandes,¿Como de grande eres tu? :)

victor_18993

Confirmed and fixed in r12209.

The regression started in r12041. The switch-image logic was changed from using the direction through the turnout to using only the direction from the previous route tile to the turnout. That always produced a single ribi, so the bend condition was never true and the switching graphics were never selected.

Nazalassa's patch identified the correct fix, but it still excluded a valid case where the turnout is at route index 1. The final fix restores the through-turnout direction using the previous and next route tiles and accepts that case as well.
The change is now integrated in r12209.

Full test suite after integration: 293/293 passed on a fresh checkout of the committed revision.
I also prepared regression tests for the switching states, but one of them proved timing-sensitive under different execution loads, so I did not add a potentially flaky test to trunk. The production fix itself was verified independently across the affected switch states and paksets.

Thanks, Nazalassa, for the report and for providing the original patch.
En la vida todo son vivencias y cada una de ellas nos hace mas grandes,¿Como de grande eres tu? :)