OpenTTD

Tasklist

FS#1832 - Problem with GRF varaction 2 station variable 41

Attached to Project: OpenTTD
Opened by Martin (mart3p) - Friday, 07 March 2008, 12:32 GMT
Last edited by Remko Bijker (Rubidium) - Saturday, 10 January 2009, 14:30 GMT
Type Bug
Category NewGRF → NewStations
Status Closed
Assigned To No-one
Operating System All
Severity Medium
Priority Normal
Reported Version 0.6.0-beta5
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Variable 41 is supposed to return platform info and relative position for individually built parts of a station. This does not seem to be working correctly in OpenTTD. The difference between the behaviour in TTDPatch and OpenTTD is shown in the screenshots, with 2 different station configurations.

This station is using bits 0 to 3 of the value returned by var.41 (position along platform from north) to determine when to build the taller building. It should be built on the most northerly tile. But when a platform is built in two parts, I would expect the northern tile of each part to be a taller building, as happens in TTDPatch.

A test GRF with a much simplified version of this station is attached that demonstrates the problem.
This task depends upon

Closed by  Remko Bijker (Rubidium)
Saturday, 10 January 2009, 14:30 GMT
Reason for closing:  Fixed
Additional comments about closing:  In r14956.
Comment by Peter Nelson (peter1138) - Friday, 07 March 2008, 12:54 GMT
By design...

Can be changed by removing lines 670-673 of newgrf_station.cpp
Comment by Martin (mart3p) - Friday, 07 March 2008, 14:54 GMT
Yes, it works as I would have expected with those lines removed...

So, why are those lines needed? Var. 41 seems fairly useless if it has the same behaviour as var. 40.
Comment by Peter Nelson (peter1138) - Friday, 07 March 2008, 14:59 GMT
There is a reason. I just can't remember it any more.

Possibly because the limit on station parts could get used up more rapidly...
Comment by Martin (mart3p) - Friday, 07 March 2008, 15:28 GMT
Could it be changed, so that at least parts of the station with a different orientation, are allocated with a different station spec?

Loading...