-
-
Notifications
You must be signed in to change notification settings - Fork 957
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 for power/running cost sorting algorithm. #7561
Comments
dorobouNeko
added a commit
to dorobouNeko/OpenTTD
that referenced
this issue
May 5, 2019
dorobouNeko
added a commit
to dorobouNeko/OpenTTD
that referenced
this issue
May 5, 2019
dorobouNeko
added a commit
to dorobouNeko/OpenTTD
that referenced
this issue
May 5, 2019
dorobouNeko
added a commit
to dorobouNeko/OpenTTD
that referenced
this issue
May 6, 2019
dorobouNeko
added a commit
to dorobouNeko/OpenTTD
that referenced
this issue
May 6, 2019
dorobouNeko
added a commit
to dorobouNeko/OpenTTD
that referenced
this issue
May 6, 2019
… one not-equal (!=)
dorobouNeko
added a commit
to dorobouNeko/OpenTTD
that referenced
this issue
May 6, 2019
dorobouNeko
added a commit
to dorobouNeko/OpenTTD
that referenced
this issue
May 6, 2019
dorobouNeko
added a commit
to dorobouNeko/OpenTTD
that referenced
this issue
May 6, 2019
dorobouNeko
added a commit
to dorobouNeko/OpenTTD
that referenced
this issue
May 6, 2019
dorobouNeko
added a commit
to dorobouNeko/OpenTTD
that referenced
this issue
May 6, 2019
dorobouNeko
added a commit
to dorobouNeko/OpenTTD
that referenced
this issue
May 6, 2019
dorobouNeko
added a commit
to dorobouNeko/OpenTTD
that referenced
this issue
May 14, 2019
dorobouNeko
added a commit
to dorobouNeko/OpenTTD
that referenced
this issue
May 16, 2019
dorobouNeko
added a commit
to dorobouNeko/OpenTTD
that referenced
this issue
May 16, 2019
(link: #7573) |
dorobouNeko
added a commit
to dorobouNeko/OpenTTD
that referenced
this issue
Jun 9, 2019
dorobouNeko
added a commit
to dorobouNeko/OpenTTD
that referenced
this issue
Jun 9, 2019
douiwby
pushed a commit
to douiwby/OpenTTD
that referenced
this issue
Apr 16, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The algorithm assumes that running cost (in GBP) is always higher than power, which is not always true.
Solution would be to make the division and compare two floats, with enough precision. Also take into account zero running cost when dividing.
I would code this but my c++ is kinda rusty and i bet someone else could make this much more elegant and consistent with the project.
The text was updated successfully, but these errors were encountered: