New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: unpowered trailing parts of articulated engines use pax company colour #10146
Comments
…r for trailing parts following aebd97a; set trailing unit action 0 power to 1 hp for engines, this violates the spec which requires trailing unit power to be 0, but fixes the issue; see also OpenTTD/OpenTTD#10146
…r for trailing parts following aebd97a; set trailing unit action 0 power to 1 hp for engines, this violates the spec which requires trailing unit power to be 0, but fixes the issue; see also OpenTTD/OpenTTD#10146
The "expected behavior" is the intended behavior. Oh, and the |
https://github.com/OpenTTD/OpenTTD/blob/master/src/vehicle.cpp#L1890 Setting the power of the trailing parts to zero sets railveh_type to RAILVEH_WAGON |
For futher reference: 336fda6 |
Version of OpenTTD
12.2
Expected result
Trailing parts of articulated engines use company colour set by player for engine class.
Actual result
Trailing parts of articulated engines use company colour set by player for passenger coach (engine class).
Steps to reproduce
Using Iron Horse 2.61.1
Set company colours per the screenshot.
Observe that trailing parts of engines 1, 2, 6, 7 are using the pax coach colours. See note about engine 8 further down.
Issue does not occur in Iron Horse 2.48.0.
Bisecting shows that the issue was introduced by the following commit andythenorth/iron-horse@aebd97a
That commit brings Iron Horse into compliance with the grf spec, where power for trailing parts must be 0 (zero).
https://newgrf-specs.tt-wiki.net/wiki/Action0/Vehicles/Trains#Properties
If the power for trailing parts is non-zero, the company colour bug is not present, however that is not compliant with the grf spec. Note that setting power on trailing parts does not appear to affect the actual power used in game, which seems to depend only on lead part (although the callback may also be affecting this result).
In the screenshot, engine 8 is using the correct colour as it has a different implementation, and has power set (incorrectly) on the trailing part.
Options to solve this appear to be:
The text was updated successfully, but these errors were encountered: