OpenTTD

Tasklist

FS#2629 - Viewport Tunnel Building

Attached to Project: OpenTTD
Opened by Hans (hackalittlebit) - Thursday, 12 February 2009, 12:22 GMT
Last edited by andythenorth (andythenorth) - Monday, 14 August 2017, 20:22 GMT
Type Patch
Category Interface
Status Closed
Assigned To andythenorth (andythenorth)
Operating System All
Severity Low
Priority Normal
Reported Version 0.6.3
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 0
Private No

Details

Feature: Focus viewport onto tunnel end by pressing Ctrl when building tunnel.
will only work when viewport allready open.
Changes: Viewport has now EYE to focus main screen to viewport center.

Code has no influence on original game play behavior.

Regards Hans

This task depends upon

Closed by  andythenorth (andythenorth)
Monday, 14 August 2017, 20:22 GMT
Reason for closing:  Won't implement
Additional comments about closing:  Mass closure of patch tickets with no commentary for >5 years. Goal is to reduce patch queue as an experiment to see if it aids faster reviewing and rejection/acceptance (it may not). If this offends you and the patch is maintained and compiles with current trunk, discuss with andythenorth in irc. (andythenorth has no ability to review patches but can re-open tickets).
Comment by Hans (hackalittlebit) - Thursday, 12 February 2009, 12:22 GMT
See foto
Comment by Remko Bijker (Rubidium) - Monday, 07 September 2009, 15:24 GMT
This only works when a viewport with number 0 is opened; e.g. when I open 2 viewports and open the first.

Furthermore, which is a much bigger problem: you're using _ctrl_pressed in the command handling code. This code is called also when someone else builds a tunnel, meaning that *if* you have the first viewport open, you have ctrl pressed (for one of the many reasons) and someone else builds a tunnel your first viewport will be redirected.
Comment by Hans (hackalittlebit) - Wednesday, 09 September 2009, 12:35 GMT
Thanks Remko for having a look at it.

I had a look at the code last night and made some improvements
the problem that I still have to solve is finding the 'first' open viewport of the user that pressed the Ctrl key.
finding the viewport I do with a while loop but I have no clue how the relation user - window works in openttd.
I will need some time to discover if that is posible.

Anyhow thanks

Hackalittlebit

P.S will post updated patch tonight
Comment by Hans (hackalittlebit) - Wednesday, 09 September 2009, 23:33 GMT
Here is revised Patch

I am not shure if it will work in multi player situation.
Please have a look at it

Regards HackaLittleBit

Loading...