RigsOfRods / rigs-of-rods

Main development repository for Rigs of Rods soft-body physics simulator
https://www.rigsofrods.org
GNU General Public License v3.0
1.01k stars 175 forks source link

Compatibility regression of `hydros` flag `r` (rudder input) #2932

Closed ohlidalp closed 2 years ago

ohlidalp commented 2 years ago

Kudos to DannyWerewolf on Discord for finding and reporting!

The problem:

Next steps: I'm going to investigate what hapenned and later document this "trick" because I like when players get creative with the software and find edge cases. I'm also keen to maintain backwards compatibility.

Discuss on the forum: https://forum.rigsofrods.org/threads/hydro-r-flag.3709/

ohlidalp commented 2 years ago

I found the culprit: 9421c6843c10973c835e2e44de730f6f5919405d

Apparently, I was (once again) careless when maintaining the truck file format (just this time not the parser but the spawner). There was a nicely commented "quirk" snippet https://github.com/RigsOfRods/rigs-of-rods/commit/9421c6843c10973c835e2e44de730f6f5919405d#diff-f4be9d8504e97f595a60f43768208d63f3c0b62dc8565f08a65df80720ff8d37L3696-L3704 that I tried to implement more elegantly https://github.com/RigsOfRods/rigs-of-rods/commit/9421c6843c10973c835e2e44de730f6f5919405d#diff-f4be9d8504e97f595a60f43768208d63f3c0b62dc8565f08a65df80720ff8d37R3691-R3695 but I introduced a bug: it would break as soon as another flag, for example 'r', was added.