Skip to content
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

Wrong align train in depot or on tracks(?) #4910

Closed
DorpsGek opened this issue Dec 24, 2011 · 2 comments
Closed

Wrong align train in depot or on tracks(?) #4910

DorpsGek opened this issue Dec 24, 2011 · 2 comments
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)

Comments

@DorpsGek
Copy link
Member

akasoft opened the ticket and wrote:

Create new game with xussr.grf, buy align car s8, s6, s6, s8 and 3 s6 (see screen 1).
Move mouse on train 3, hold Ctrl and Click, train 3 is flipped. Attention - flipped train is shift right on right side align car s8.
Start train 5 (contains 3 align car s6). For speed up use Tab key.
When train leave depot (see screen 2), press Reverse button on right toolbar of train 5.
See screen 3 - train 5 on tracks reverse without any shift.
With Sprite aligner tool change x offset from "-8" to "-16".
In depot flipped train 3 coincided with train 2 (see screen 4).
But on tracks if we press Reverse button again train 3 shifted left by 8 px.
But expected behavior as on screen 2.

Align car 8 is reversed correctly.

Used openttd trunk 23655, grf made with nmlc 1769.

This bug or what I does wrong?

Attachments

Reported version: trunk
Operating system: Windows


This issue was imported from FlySpray: https://bugs.openttd.org/task/4910
@DorpsGek
Copy link
Member Author

Rubidium wrote:

Flipping the train simply changes the graphics that need to be taken, not the 'anchor' point of the graphics. For non-shortened vehicles the anchor point is the same for either direction, but for shortened vehicles there are two distinct anchor points for the vehicles.

This means that if you want to support the ctrl-click flipping in the depot you need to provide two distinct sets of graphics. One for the non-flipped and one for the flipped vehicle, otherwise they do not align right.

What you have done with the sprite aligner is changing the alignment so the flipped graphics look right, but you inadvertently broken the graphics for the non-flipped vehicle going in the opposite direction. As there are two distinct anchor points (for backward compatability reasons) you need to provide two sets of graphics if you want to support ctrl-click flipping of vehicles. This is the major reason why flipping has been disabled by default.


This comment was imported from FlySpray: https://bugs.openttd.org/task/4910#comment10623

@DorpsGek
Copy link
Member Author

Rubidium closed the ticket.

Reason for closing: Bug in NewGRF


This comment was imported from FlySpray: https://bugs.openttd.org/task/4910

@DorpsGek DorpsGek added flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) Vehicles labels Apr 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)
Projects
None yet
Development

No branches or pull requests

1 participant