GetPlatformLength returns wrong values for adjacent stations
Moderator: OpenTTD Developers
-
- Traffic Manager
- Posts: 165
- Joined: 03 Dec 2007 15:06
GetPlatformLength returns wrong values for adjacent stations
if two stations are built directly next to each other (with ctrl) GetPlatformLength returns the length of both, i noticed that with eddi's middle_stop patch, that lets trains stop in the middle of too long platforms
Re: GetPlatformLength returns wrong values for adjacent stations
i've digged a little into this, most likely cause is this:
it needs a check wether t1 and t2 belong to the same station
Code: Select all
station_map.h:186:
static inline bool IsCompatibleTrainStationTile(TileIndex t1, TileIndex t2)
{
assert(IsRailwayStationTile(t2));
return
IsRailwayStationTile(t1) &&
IsCompatibleRail(GetRailType(t1), GetRailType(t2)) &&
GetRailStationAxis(t1) == GetRailStationAxis(t2) &&
!IsStationTileBlocked(t1);
}
Re: GetPlatformLength returns wrong values for adjacent stations
Use http://bugs.openttd.org for bugs
He's like, some kind of OpenTTD developer.
Who is online
Users browsing this forum: No registered users and 16 guests