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

trains are lost after autorenewal/autoreplace #732

Closed
DorpsGek opened this issue Apr 15, 2007 · 5 comments
Closed

trains are lost after autorenewal/autoreplace #732

DorpsGek opened this issue Apr 15, 2007 · 5 comments
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)

Comments

@DorpsGek
Copy link
Member

pshemko opened the ticket and wrote:

rev: 9601

After autoreplacing (or auto-renewing) a train it seems to be unable to find way to the first order if it's a waypoint. If it's a station everything is fine.

Reported version: trunk
Operating system: All


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

Bjarni wrote:

could you please give a savegame where this happens?


This comment was imported from FlySpray: https://bugs.openttd.org/task/732#comment1137

@DorpsGek
Copy link
Member Author

pshemko wrote:

problem is also present in 9640.
First save game is just before auto-replacing
Second - after when the train passes through the waypoint without noticing

Both save games should be from 'vanilla' version (I encountered it first in a game with 'better town roads', but after compiling it from scratch it still exists)


This comment was imported from FlySpray: https://bugs.openttd.org/task/732#comment1138

@DorpsGek
Copy link
Member Author

Rubidium wrote:

It only seems to happen with NPF or YAPF enabled; it seems to work properly with NTP. When you clone a vehicle everything works fine.


This comment was imported from FlySpray: https://bugs.openttd.org/task/732#comment1177

@DorpsGek
Copy link
Member Author

KUDr wrote:

Tried to narrow the problem: It happens because v->dest_tile is 0 (instead of waypoint->xy).

  1. Fixed YAPF vulnerability for incorrect v->dest_tile value in case of waypoint:
    r9745 /trunk/src/yapf/yapf_destrail.hpp (2007-04-29 09:55:32 UTC)
    [11:55:36] <42> -Codechange [YAPF}: if destination is a waypoint then YAPF gets destination tile from that waypoint->xy instead of from v->dest_tile

  2. Added DEBUG that shows the problem:
    r9746 /trunk/src/yapf/yapf_destrail.hpp (2007-04-29 10:14:42 UTC)
    [12:14:48] <42> -Codechange [YAPF]: added DEBUGs level 0 if the current train order is OT_GOTO_WAYPOINT and waypoint is invalid or v->dest_tile is wrong

  3. Bjarni should find the point where v->dest_tile should be copied


This comment was imported from FlySpray: https://bugs.openttd.org/task/732#comment1178

@DorpsGek
Copy link
Member Author

Bjarni closed the ticket.

Reason for closing: Fixed

r9753


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

@DorpsGek DorpsGek added Autoreplace flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) labels Apr 6, 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