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 #9407: desync when founding a town nearby a station #9526

Merged
merged 1 commit into from Aug 31, 2021

Commits on Aug 31, 2021

  1. Fix OpenTTD#9407: desync when founding a town nearby a station

    "stations_near" wasn't updated when founding a town near
    a station. As this variable is not saved, any client joining
    after the town is founded has a different value for
    "stations_near", potentially causing desyncs.
    
    As the intention of this if() statement was to skip an expensive
    calculation when there are clearly no stations, better to move
    that check inside the function, so other places also enjoy
    the speedup.
    TrueBrain committed Aug 31, 2021
    Copy the full SHA
    99562d6 View commit details
    Browse the repository at this point in the history