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

vehicle selection bug #73

Closed
DorpsGek opened this issue Mar 13, 2006 · 6 comments
Closed

vehicle selection bug #73

DorpsGek opened this issue Mar 13, 2006 · 6 comments
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)

Comments

@DorpsGek
Copy link
Member

bobingabout opened the ticket and wrote:

when a new vehicle becomes available before the 1 that is currently selected, they are all bumbed down, and you are now have selected the 1 that was above the 1 you were on.

Reported version: trunk
Operating system: All


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

TrueBrain wrote:

This bug is very real, but hard to fix. Even more because it rarely happens, I don't think it has any priority at all.


This comment was imported from FlySpray: https://bugs.openttd.org/task/73#comment439

@DorpsGek
Copy link
Member Author

DorpsGek commented Sep 1, 2006

GrimRC wrote:

A savegame just before one of the dates where this happens would be helpful.


This comment was imported from FlySpray: https://bugs.openttd.org/task/73#comment484

@DorpsGek
Copy link
Member Author

DorpsGek commented Sep 2, 2006

GrimRC wrote:

I've attached a savegame which is just before a new aircraft is introduced. Select an aircraft in the 'build aircraft' menu and press 'yes' in the aircraft preview mode box which shows around 1st Jan., to test the bug.


This comment was imported from FlySpray: https://bugs.openttd.org/task/73#comment499

@DorpsGek
Copy link
Member Author

DorpsGek commented Sep 2, 2006

GrimRC wrote:

I've attached my patch, which somewhat fixes this problem. It only fixes the 'build aircraft' window, and can be considered a proof-of-concept. Would someone please tell me if this is the right approach? The patch changes .sel_index to 0 normally, and only sets it temporarily if the user clicks on a vehicle. .sel_eng is used to track which vehicle is currently selected.

My patch breaks 'vehicle renew' for aircraft, although I'm not sure how as I don't know how to activate and test this feature in the game. This functionality needs reimplementing too, as it depends on .sel_index somehow. I have put some (lame) fixes to this area to prevent assertions, and allow my patch to be tested as it is (in an incomplete state).

Test this with my savegame in my previous comment.

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/73#comment500

@DorpsGek
Copy link
Member Author

DorpsGek commented Sep 3, 2006

GrimRC wrote:

I've given up on fixing this as my patch wasn't deemed an acceptable approach. My patch does fix the problem, but seems to break the autorenew code at the same time. I haven't looked in to the possibility of fixing the autorenew code to work with my patch, but my patch's breaking of the autorenew code wasn't the reason given for it being considered unacceptable. I'm not able to write a fix in a way which would be considered cleaner. The current code can be considered unclean (irrespective of its bugginess), and my patch is simply a tweaking of it (rather than a hefty rewrite).

My offer of extending this (crude) patch to fix all vehicle build types in a similar manner remains open for the foreseeable future, although someone else would have to fix the autorenew code to be compatible with this approach.


This comment was imported from FlySpray: https://bugs.openttd.org/task/73#comment509

@DorpsGek
Copy link
Member Author

DorpsGek commented Dec 9, 2006

Darkvater closed the ticket.

Reason for closing: Fixed

This problem has been fixed as a side-effect of r6722? (eg store a list of vehicles, and reference a selection by EngineID instead of offset)


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

@DorpsGek DorpsGek closed this as completed Dec 9, 2006
@DorpsGek DorpsGek added flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) Vehicles 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