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

Fix #7670: Cache the origin tile to prevent recurring calls to the road pathfinder when a vehicle is blocked by another #7822

Closed

Conversation

SamuXarick
Copy link
Contributor

@SamuXarick SamuXarick commented Nov 3, 2019

This is a tentative fix for #7670 , but not fully tested. I thought of caching the origin of where the pathfind starts its search. It seems to solve the issue, but I'm not sure this is the right approach.

Problem is best explained here: #7670 (comment)

savegame for testing, requires only 2 vehicles and a giant road network to trigger the issue : https://github.com/OpenTTD/OpenTTD/files/3801034/2.vehicles.only.zip

2019-11-03

nielsmh
nielsmh previously requested changes Feb 9, 2020
src/roadveh.h Show resolved Hide resolved
@SamuXarick SamuXarick force-pushed the blocked-road-vehicle-yapf-fix branch from d9c7987 to bb267f8 Compare March 30, 2020 21:19
@SamuXarick SamuXarick force-pushed the blocked-road-vehicle-yapf-fix branch from bb267f8 to ca05e3c Compare May 12, 2020 15:12
@SamuXarick SamuXarick force-pushed the blocked-road-vehicle-yapf-fix branch from ca05e3c to 3948e28 Compare July 12, 2020 10:32
@TrueBrain TrueBrain added candidate: probably not This Pull Request will most likely be closed soon size: small This Pull Request is small, and should be relative easy to process labels Dec 14, 2020
@SamuXarick SamuXarick force-pushed the blocked-road-vehicle-yapf-fix branch 2 times, most recently from 8de304c to 3fe07ea Compare December 22, 2020 17:22
… the road pathfinder when a vehicle is blocked by another
@SamuXarick SamuXarick force-pushed the blocked-road-vehicle-yapf-fix branch from 3fe07ea to 2be4c78 Compare January 8, 2021 17:34
@SamuXarick
Copy link
Contributor Author

Just retested this as of current master (and on a new CPU).

Without fix: pathfinder is called every tick
Henfingburg Transport, 1952-03-14

With fix: pathfinder is called once
Henfingburg Transport, 1952-03-14#1

@glx22
Copy link
Contributor

glx22 commented Jan 13, 2021

I think master...glx22:fix_7670 has the same effect without requiring savegame bump.

@glx22
Copy link
Contributor

glx22 commented Jan 14, 2021

Superseded by #8568

@glx22 glx22 closed this Jan 14, 2021
@SamuXarick SamuXarick deleted the blocked-road-vehicle-yapf-fix branch January 14, 2021 17:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
candidate: probably not This Pull Request will most likely be closed soon size: small This Pull Request is small, and should be relative easy to process
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants