Municipal(Town Owned) Airports

Forum for technical discussions regarding development. If you have a general suggestion, problem or comment, please use one of the other forums.

Moderator: OpenTTD Developers

DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Post by DaleStan »

oVRoM wrote:So a quick & very dirty patch would be simple :-)

Code: Select all

assert(i < lengthof(_players) || 15);
;-)
If you're going to do that, may as well change it to
"((void)0);". What you wrote simplifies to "assert(foo || true);", which simplifies to "assert(true);", since foo has no side-effects.

Hint: ((i < lengthof(_players)) || 15)
To get a good answer, ask a Smart Question. Similarly, if you want a bug fixed, write a Useful Bug Report. No TTDPatch crashlog? Then follow directions.
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
User avatar
JimboTG
Engineer
Engineer
Posts: 80
Joined: 08 Sep 2005 10:45
Location: Portsmouth, England

Post by JimboTG »

very quick and dirty indeed, i think i know how to fix that without altering an assert, but like i say i wont be able to do anything until tonight. i will however have it fixed for the next update(probably around midweek) but until then use that quick fix.

thanks for the valuable feedback
I cant put a signature here, I dropped my pen
ThunderAI
Transport Coordinator
Transport Coordinator
Posts: 306
Joined: 26 Nov 2003 09:15

Re: Municipal(Town Owned) Airports

Post by ThunderAI »

Nice,

May I make a suggestion. I would suggest that rather than 20% of total revenue for a trip from or to a Municipal Airport, a company is changed based upon a 'landing fee' as adjusted by the Municipality. Even when no revenue is generated you are charged for landing.

I dont know any airports where an airline is charged on revenue.
User avatar
webfreakz.nl
Director
Director
Posts: 627
Joined: 11 Aug 2005 08:22
Location: Localhost, 127.0.0.1, [The Netherlands: South Holland-> Westland]
Contact:

Post by webfreakz.nl »

I did a clean checkout of SVN and applied your patch but it has some errors.-
(will post the line/file later)

What I discovered was when I load a scenario it is slower than
when an original OpenTTD loads the same scenario?
And the TAB button doesn't work anymore?

edit:

the error file was settings_gui.c on line 703 but with TortoiseMerge it shows
also errors on line 691-693.
# Programming is like sex, one mistake and you have to support it for the rest of your life. (Michael Sinz)
User avatar
JimboTG
Engineer
Engineer
Posts: 80
Joined: 08 Sep 2005 10:45
Location: Portsmouth, England

Post by JimboTG »

How big was the map you were playing? What was the difficulty setting as regards towns? High/low/normal? was there any particular point that the game slowed down? did you get errors if you updated the source or when you just applied the diff straight?

The patch does need some optimisation, these are things Im working on right now. Also the last revision I wrote against was 3070 so some new bugs might have been introduced with other updates
I cant put a signature here, I dropped my pen
User avatar
webfreakz.nl
Director
Director
Posts: 627
Joined: 11 Aug 2005 08:22
Location: Localhost, 127.0.0.1, [The Netherlands: South Holland-> Westland]
Contact:

Post by webfreakz.nl »

I just did a clean checkout and applied the patch. My map is 512x512. The game opens immediately with an original OpenTTD .exe / a self compiled one of the SVN source, but with your patch included and a clean SVN source is has a delay of about ± 1-2 seconds.
# Programming is like sex, one mistake and you have to support it for the rest of your life. (Michael Sinz)
User avatar
Smoky555
Engineer
Engineer
Posts: 97
Joined: 06 Jan 2005 05:22
Location: Russia, Volgograd
Contact:

Post by Smoky555 »

JimboTG, could you publish only m_airport patch (without subsidiaries) ?
oVRoM
Engineer
Engineer
Posts: 37
Joined: 11 Jan 2003 10:40
Location: Utah

Post by oVRoM »

Smoky555 wrote:JimboTG, could you publish only m_airport patch (without subsidiaries) ?
Check the first post, it's there.
User avatar
SirkoZ
Tycoon
Tycoon
Posts: 1518
Joined: 06 Mar 2004 23:51
Location: The sunny side of Alps

Post by SirkoZ »

BUG: As experienced in the latest Integrated_nightly (r3090), the client and even server crashes when one tries to query ("?") the municipal airport. Although I don't know how the exe with this patch alone would perform but I think the same...


EDIT: I have just checked out the airport code for a possible different municipal airport.....let's put it this way - it'll require some more checking. :)
User avatar
Smoky555
Engineer
Engineer
Posts: 97
Joined: 06 Jan 2005 05:22
Location: Russia, Volgograd
Contact:

Post by Smoky555 »

Jimbo, i can't apply your patch to the latest SVN (3113).
It is an many errors in vehicle.c
Could you make new patch for the latest SVN?
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Post by DaleStan »

While we're in the business, why the whitespace changes in settings_gui.c?
To get a good answer, ask a Smart Question. Similarly, if you want a bug fixed, write a Useful Bug Report. No TTDPatch crashlog? Then follow directions.
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
User avatar
JimboTG
Engineer
Engineer
Posts: 80
Joined: 08 Sep 2005 10:45
Location: Portsmouth, England

Post by JimboTG »

sorry guys ive hadsome stuff to deal with lately so i havnt had much time to play with this, the situation looks to remain that way for quite a while yet. the whitespace changes i made were just to help me to understand the way the gui works, as for the other bugs they are all caused by the fundamental problem that OWNER_TOWN is not actually classed as a player, so the game assumes something fishy is going on, I dont know how Im gonna fix this without major headaches. I will try to grab some time on this when I can, but no promises
I cant put a signature here, I dropped my pen
leenx
Engineer
Engineer
Posts: 11
Joined: 27 Jul 2005 18:01
Location: Brazil

Ideas...

Post by leenx »

This is pretty amazing!
:oops: I love the OPENTTD community!
I started a discussion about this topic about 3 months ago... there some ideas there, please take a look... I dreaming in testing this patch in a nigthly...

:arrow: http://www.tt-forums.net/viewtopic.php?t=20093
_________________________________________
Over and over and over and over

Tycoon Adicted
User avatar
^Cartman^
Engineer
Engineer
Posts: 110
Joined: 28 Apr 2005 14:42

Post by ^Cartman^ »

You should make cities not building airports when there is already an airport not so far away... only a little suggestion, because cities in my multiplayer game makes airports close to our airports.
User avatar
WWTBAM
Moderator
Moderator
Posts: 3689
Joined: 02 Apr 2005 07:01
Location: Sydney NSW Antipodea
Contact:

Post by WWTBAM »

or offer you a free landing for a certain amouint of time and close all nearby airports of that city and ofcourse change the ais routes or even better if the ais is in adecent spot convert it.
Formerly known as r0b0t_b0y2003, robotboy, roboboy and beclawat. The best place to get the most recent nightly builds of TTDPatch is: http://roboboy.users.tt-forums.net/TTDPatch/nightlies/
onewayticket
Engineer
Engineer
Posts: 4
Joined: 28 May 2005 20:28

Post by onewayticket »

is this patch still being developed?
User avatar
JimboTG
Engineer
Engineer
Posts: 80
Joined: 08 Sep 2005 10:45
Location: Portsmouth, England

Post by JimboTG »

It is with a heavy heart that I must inform you all that I can no longer spend any time on this patch for a couple of reasons.

1.) Im trying to emmigrate to Canada which cost lots of money, so im putting in as many hours in the taxi as possible.

2.) My level of C programming is poor/mediocre at the best of times (ask anyone who's analyzed the patch itself) so its better off in the hands of a more competant coder.

I do however encourage anyone else who wants to play with it to do so. I will happily answer any questions about the source code as long as I can remember the answer myself. As far as I know city airports has been requested A LOT so there must be someone out there with the skill and motivation to see it through. Hopefully Ive made a good first step.
I cant put a signature here, I dropped my pen
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 13 guests