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

Conditional Order Maximum Speed Value wrong #6225

Closed
DorpsGek opened this issue Feb 1, 2015 · 3 comments
Closed

Conditional Order Maximum Speed Value wrong #6225

DorpsGek opened this issue Feb 1, 2015 · 3 comments
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)

Comments

@DorpsGek
Copy link
Member

DorpsGek commented Feb 1, 2015

jogi opened the ticket and wrote:

This affects all types of vehicles.

The situation is about the setup of an conditional order. If I enter some value for Maximum speed, certain values come out wrong. For example:

Enter 2, click ok, Conditional Order gets updated to 3. Because of that, it is not possible to set the value of the conditional order to 2.
Further examples:
Enter 5 -> 6
Enter 7 -> 8
Enter 10 -> 11
Enter 13 -> 14
Enter 200 -> 201

These shifts are the same in each new game I started and also across versions(checked in 1.4.4, r27134 and 1.3.3). Other Values don't shift at all.

(Tested in Ubuntu 14.04 LTS)

Reported version: trunk
Operating system: Linux


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

DorpsGek commented Feb 2, 2015

Alberth wrote:

max speed 2 doesn't sound very useful :)

It sounds like rounding errors to me, speeds are not exact numbers. Depending on your displayed unit, values slightly change. Can't you just pick a slight smaller value?


This comment was imported from FlySpray: https://bugs.openttd.org/task/6225#comment13753

@DorpsGek
Copy link
Member Author

DorpsGek commented Feb 3, 2015

jogi wrote:

You are certainly right. I just came across this issue when I was checking out some cases for the first patch I wrote (https://bugs.openttd.org/task/6078).
I also agree, that this is a case which is not very important. I haven't used the Maximum Speed condition yet since I don't know what for.

However, it is confusing if the game does something else than you expect without comment. (You want to compare to a Speed of 200km/h? I only let you compare against 201 km/h!)

The rounding errors explain the issue. I wasn't aware that the speed units even could be changed. The value is a 11-Bit integer, so the range is between 0 and 2047. The same range of possible values is there in the mph unit, so the speed is only exact for this case.


This comment was imported from FlySpray: https://bugs.openttd.org/task/6225#comment13754

@DorpsGek
Copy link
Member Author

Alberth closed the ticket.

Reason for closing: Won't implement

Speeds are approximations for most units, which means you may get an off-by-one here and there.


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

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