mirror of
https://github.com/OpenTTD/OpenTTD
synced 2026-01-24 04:34:16 +01:00
Codechange: split GetRoadDir as bays have DiagDir and drive throughs have Axis
This commit is contained in:
@@ -897,7 +897,7 @@ static Trackdir RoadFindPathToDest(RoadVehicle *v, TileIndex tile, DiagDirection
|
||||
} else if (IsTileType(tile, MP_STATION) && IsBayRoadStopTile(tile)) {
|
||||
/* Standard road stop (drive-through stops are treated as normal road) */
|
||||
|
||||
if (!IsTileOwner(tile, v->owner) || GetRoadStopDir(tile) == enterdir || v->HasArticulatedPart()) {
|
||||
if (!IsTileOwner(tile, v->owner) || GetBayRoadStopDir(tile) == enterdir || v->HasArticulatedPart()) {
|
||||
/* different station owner or wrong orientation or the vehicle has articulated parts */
|
||||
trackdirs = TRACKDIR_BIT_NONE;
|
||||
} else {
|
||||
@@ -1746,7 +1746,7 @@ Trackdir RoadVehicle::GetVehicleTrackdir() const
|
||||
|
||||
if (IsBayRoadStopTile(this->tile)) {
|
||||
/* We'll assume the road vehicle is facing outwards */
|
||||
return DiagDirToDiagTrackdir(GetRoadStopDir(this->tile)); // Road vehicle in a station
|
||||
return DiagDirToDiagTrackdir(GetBayRoadStopDir(this->tile)); // Road vehicle in a station
|
||||
}
|
||||
|
||||
/* Drive through road stops / wormholes (tunnels) */
|
||||
|
||||
Reference in New Issue
Block a user