(svn r2189) Introduce and use IsCompatibleTrainStationTile()

This should prevent trains, which are longer than the station, to turn around without stopping under certain circumstances and fix speed limit for trains entering a station, when realistic accerlation is used
This commit is contained in:
tron
2005-04-12 10:31:26 +00:00
parent beb185248b
commit 53d30138b2
3 changed files with 11 additions and 2 deletions

View File

@@ -154,7 +154,7 @@ static int GetTrainAcceleration(Vehicle *v, bool mode)
do {
station_length++;
tile = TILE_ADD(tile, TileOffsByDir(v->direction / 2));
} while (IsTrainStationTile(tile) && (_map5[tile] & 1) == (_map5[v->tile] & 1));
} while (IsCompatibleTrainStationTile(tile, v->tile));
delta_v = v->cur_speed / (station_length + 1);
if (v->max_speed > (v->cur_speed - delta_v))