(svn r8709) -Fix/Codechange: Rename the function GetStationPlatforms into GetPlatformLength because that is what it really does. Overload it because there is already a GetPlatformLength (one gives the length of the whole platform, the other gives the remaining length in a given direction). Turned both functions into methods of Station. While messing around with it, fix a problem where loading times for overhanging trains are miscomputed.

This commit is contained in:
celestar
2007-02-13 16:36:38 +00:00
parent bf147e395e
commit 72e74c29d4
6 changed files with 55 additions and 56 deletions

View File

@@ -356,7 +356,7 @@ static int GetTrainAcceleration(Vehicle *v, bool mode)
if (IsTileType(v->tile, MP_STATION) && IsFrontEngine(v)) {
if (TrainShouldStop(v, v->tile)) {
int station_length = GetPlatformLength(v->tile, DirToDiagDir(v->direction));
int station_length = GetStationByTile(v->tile)->GetPlatformLength(v->tile, DirToDiagDir(v->direction));
int delta_v;
max_speed = 120;