Patch: middle stop

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

Post Reply
Tiberius
Engineer
Engineer
Posts: 86
Joined: 17 Sep 2004 03:15

Patch: middle stop

Post by Tiberius »

Update for latest trunk, original from:
http://www.tt-forums.net/viewtopic.php? ... op#p685930
Thanks, Eddi!

This patch will make trains shorter than the station stop at the middle of the platform.

EDIT: change to svn-diff style, the code itself isn't altered.
Attachments
middlestop_r13374.patch
(1.03 KiB) Downloaded 210 times
I may implement/fix/tweak/eat/ditch it soon (or in distant future, if at all, so don't hold your breath).
If anyone want to be the one please implement it for us all 8)
User avatar
pavel1269
Route Supervisor
Route Supervisor
Posts: 473
Joined: 03 Dec 2006 13:22
Location: Czech Republic
Contact:

Re: Patch: middle stop

Post by pavel1269 »

update to this nice eyecandy patch :-)
edit: updated againts 2435revisions :-P
Last edited by pavel1269 on 27 Mar 2009 16:46, edited 1 time in total.
Eddi
Tycoon
Tycoon
Posts: 8289
Joined: 17 Jan 2007 00:14

Re: Patch: middle stop

Post by Eddi »

i don't see why this needed an update. the original patch still applies fine here.

anyway, part of the intention of the initial patch was to NOT change the indentation level of the following lines. it only adds conflict potential with no benefit.
User avatar
pavel1269
Route Supervisor
Route Supervisor
Posts: 473
Joined: 03 Dec 2006 13:22
Location: Czech Republic
Contact:

Re: Patch: middle stop

Post by pavel1269 »

Eddi wrote: anyway, part of the intention of the initial patch was to NOT change the indentation level of the following lines. it only adds conflict potential with no benefit.
can you say that again? dont understand you :-/
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: Patch: middle stop

Post by planetmaker »

What Eddi means (and he's somewhat right with that) is the following kind of differences between the patch files

Code: Select all

-                             if (x < stop) {
-                                     uint16 spd;
+                                     if (x < stop) {
+                                             uint16 spd;
You changed (probably following coding style), the indentation level of the lines. If you don't change them, the diff will stay smaller and it is less likely to break.
User avatar
pavel1269
Route Supervisor
Route Supervisor
Posts: 473
Joined: 03 Dec 2006 13:22
Location: Czech Republic
Contact:

Re: Patch: middle stop

Post by pavel1269 »

wow, i thought, that this is a very small problem .... better to have it perfectly working ... no? :-)
its just one " " ....
Eddi
Tycoon
Tycoon
Posts: 8289
Joined: 17 Jan 2007 00:14

Re: Patch: middle stop

Post by Eddi »

the problem is not that it's a " ", the problem is that the line appears in the patch. so if any of the lines which appear in the patch are changed in trunk, a conflict will occur.

ergo, the fewer lines appear in the patch, the lower the chance for a conflict. what you did was add lines to the patch without providing new functionality, so the change is bad. there were only three conflicting changes in the history of this patch (my first version is from r6982, that is almost 9000 revisions)
User avatar
pavel1269
Route Supervisor
Route Supervisor
Posts: 473
Joined: 03 Dec 2006 13:22
Location: Czech Republic
Contact:

Re: Patch: middle stop

Post by pavel1269 »

updated again, not without those unneccessary " "
also if you play with reversing only at line ends, train will now reverse in single-entrance station just fine, no more going to end and there turning ;-)
Attachments
train_middlestop_r15860.patch
(4.01 KiB) Downloaded 159 times
Eddi
Tycoon
Tycoon
Posts: 8289
Joined: 17 Jan 2007 00:14

Re: Patch: middle stop

Post by Eddi »

if you really want to pick this up and develop it into a real feature:
  1. allow for each order to select wether the train should stop at the beginning, middle or end of platform. plus a setting which should be default
  2. adapt "realistic acceleration" to slow down towards the real stopping point, not the end of the station
User avatar
ostlandr
Chairman
Chairman
Posts: 882
Joined: 12 May 2007 01:09
Location: Northeastern USA

Re: Patch: middle stop

Post by ostlandr »

I liked this patch when I was using Tibb's Patchpack. Was nice, as it made short trains more efficient rather than that long haul to the end of the station and back.
Who is John Galt?
User avatar
DJ Nekkid
Tycoon
Tycoon
Posts: 2141
Joined: 30 Nov 2006 20:33

Re: Patch: middle stop

Post by DJ Nekkid »

Eddi wrote:if you really want to pick this up and develop it into a real feature:
  1. allow for each order to select wether the train should stop at the beginning, middle or end of platform. plus a setting which should be default
  2. adapt "realistic acceleration" to slow down towards the real stopping point, not the end of the station
I Agree, thoose things would be really nice!
Member of the
ImageImage
User avatar
pavel1269
Route Supervisor
Route Supervisor
Posts: 473
Joined: 03 Dec 2006 13:22
Location: Czech Republic
Contact:

Re: Patch: middle stop

Post by pavel1269 »

I will start as soon as i would have free time, but first i want to complete my daylength patch ... forget one last thing there :-)
welshdragon
Tycoon
Tycoon
Posts: 2148
Joined: 27 Jul 2007 15:45
Location: Sunny Wales, Boyo!
Contact:

Re: Patch: middle stop

Post by welshdragon »

CIA-9 wrote: OpenTTD: rubidium * r16037 /trunk/src/ (14 files in 4 dirs): -Feature: allow (per order) to let a train stop at the near end, middle or far end of a platform from the point of view of the driver of the train that enters the station.
:D (from #openttd just 2 minutes ago)
Semi-Retired TT-Forums Member.
These days I'm:
[list][*]A Local Transport Representative for Bus Users Cymru
[*]Social Media Advisxer for Bus Users Cymru
[*]Volunteer and Fundraiser for Guide Dogs[/list]
flickr | twitter | YouTube | Facebook | Steam

I used to be an idiot called tycoonmarkj.
Aali
Traffic Manager
Traffic Manager
Posts: 144
Joined: 01 Oct 2008 00:04
Location: Sweden

Re: Patch: middle stop

Post by Aali »

AFAIK it wasn't based on this patch. Either way, the functionality provided by it (and then some) is there :wink:
User avatar
SirXavius
Transport Coordinator
Transport Coordinator
Posts: 302
Joined: 28 Jun 2006 18:25
Location: Florida

Re: Patch: middle stop

Post by SirXavius »

Enlighten me now; what's the benefit of this patch during gameplay? I'm sure it must be helpful to be included in the trunk.... :wink:
User avatar
pavel1269
Route Supervisor
Route Supervisor
Posts: 473
Joined: 03 Dec 2006 13:22
Location: Czech Republic
Contact:

Re: Patch: middle stop

Post by pavel1269 »

if you dont se income, you can ignore it ... :-)
but if you have some main station, huge one, but there is still going some local traffic, which is usually short, it take soo long till it reach end so you can use here begin (near end) to improve it, or center as eyecandy :-P it helps but not that much ;-)
2007Alain2007
Chief Executive
Chief Executive
Posts: 658
Joined: 11 Nov 2007 12:06
Contact:

Re: Patch: middle stop(in trunk)

Post by 2007Alain2007 »

HI all this is in trunk just to say

you can pick were about you want the train to stop :)

well done for getting it there
For Community Integrated Version http://code.google.com/p/civopenttd/
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 8 guests