~ubuntu-branches/debian/squeeze/openttd/squeeze

« back to all changes in this revision

Viewing changes to src/pathfinder/yapf/yapf_road.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Matthijs Kooijman
  • Date: 2010-07-01 08:14:02 UTC
  • mfrom: (1.1.12 upstream)
  • Revision ID: james.westby@ubuntu.com-20100701081402-98jmva0t3sqywxmi
Tags: 1.0.2-1
* [00c4efe] New upstream release 1.0.2.
* [c7b38fd] Break older openttd versions instead of Conflicting with
  them.
* [36bd61f] Bump standards version to 3.9.0.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* $Id: yapf_road.cpp 18404 2009-12-04 20:52:19Z rubidium $ */
 
1
/* $Id: yapf_road.cpp 19875 2010-05-21 16:03:29Z rubidium $ */
2
2
 
3
3
/*
4
4
 * This file is part of OpenTTD.
326
326
 
327
327
        FORCEINLINE Trackdir ChooseRoadTrack(const RoadVehicle *v, TileIndex tile, DiagDirection enterdir)
328
328
        {
329
 
                /* handle special case - when next tile is destination tile */
330
 
                if (tile == v->dest_tile) {
 
329
                /* Handle special case - when next tile is destination tile.
 
330
                 * However, when going to a station the (initial) destination
 
331
                 * tile might not be a station, but a junction, in which case
 
332
                 * this method forces the vehicle to jump in circles. */
 
333
                if (tile == v->dest_tile && !v->current_order.IsType(OT_GOTO_STATION)) {
331
334
                        /* choose diagonal trackdir reachable from enterdir */
332
335
                        return DiagDirToDiagTrackdir(enterdir);
333
336
                }