Initial implementation of road waypoints
This commit is contained in:
@@ -2470,6 +2470,7 @@ public:
|
||||
|
||||
/* check rail waypoint or buoy (no ownership) */
|
||||
if ((IsRailWaypointTile(tile) && this->vli.vtype == VEH_TRAIN && IsInfraTileUsageAllowed(VEH_TRAIN, this->vli.company, tile))
|
||||
|| (IsRoadWaypointTile(tile) && this->vli.vtype == VEH_ROAD && IsInfraTileUsageAllowed(VEH_ROAD, this->vli.company, tile))
|
||||
|| (IsBuoyTile(tile) && this->vli.vtype == VEH_SHIP)) {
|
||||
if (this->vli.type != VL_STATION_LIST) return;
|
||||
if (!(Station::Get(this->vli.index)->facilities & FACIL_WAYPOINT)) return;
|
||||
@@ -2480,7 +2481,7 @@ public:
|
||||
|
||||
if (IsTileType(tile, MP_STATION)) {
|
||||
if (this->vli.type != VL_STATION_LIST) return;
|
||||
if (Station::Get(this->vli.index)->facilities & FACIL_WAYPOINT) return;
|
||||
if (BaseStation::Get(this->vli.index)->facilities & FACIL_WAYPOINT) return;
|
||||
|
||||
StationID st_index = GetStationIndex(tile);
|
||||
const Station *st = Station::Get(st_index);
|
||||
@@ -3754,7 +3755,7 @@ public:
|
||||
break;
|
||||
|
||||
case OT_GOTO_WAYPOINT: {
|
||||
assert(v->type == VEH_TRAIN || v->type == VEH_SHIP);
|
||||
assert(v->type == VEH_TRAIN || v->type == VEH_ROAD || v->type == VEH_SHIP);
|
||||
SetDParam(0, v->current_order.GetDestination());
|
||||
str = HasBit(v->vehicle_flags, VF_PATHFINDER_LOST) ? STR_VEHICLE_STATUS_CANNOT_REACH_WAYPOINT_VEL : STR_VEHICLE_STATUS_HEADING_FOR_WAYPOINT_VEL;
|
||||
SetDParam(1, v->GetDisplaySpeed());
|
||||
|
Reference in New Issue
Block a user