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

vehicles disappear when crossing certain line #869

Closed
DorpsGek opened this issue Jun 13, 2007 · 3 comments
Closed

vehicles disappear when crossing certain line #869

DorpsGek opened this issue Jun 13, 2007 · 3 comments
Labels
component: interface This is an interface issue flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)

Comments

@DorpsGek
Copy link
Member

Eddi opened the ticket and wrote:

when trains cross the line (1024+x, x) the wagons disappear for a short time, last tested in r10144

Attachments

Reported version: trunk
Operating system: All


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

SmatZ wrote:

The problem lies here:

[code]
vehicle.cpp, 46:
# define INVALID_COORD (-0x8000)
[/code]

It your coordinates, the position is computed as INVALID_COORD ( -32768 = 16 * (16 - 1024) * 2 ), so the vehicle is removed etc.


This comment was imported from FlySpray: https://bugs.openttd.org/task/869#comment1360

@DorpsGek
Copy link
Member Author

SmatZ wrote:

Solution:

# define INVALID_COORD (0x7fffffff)

In coparisons, there are all 32bit integers.
16 * 2048 * 2 = 65536, so INVALID_COORD is not to be reached

Well, devs could decide any other constant :)


This comment was imported from FlySpray: https://bugs.openttd.org/task/869#comment1361

@DorpsGek
Copy link
Member Author

Rubidium closed the ticket.

Reason for closing: Fixed

In r10153.


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

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

No branches or pull requests

1 participant