YAPF: Add penalty when reversing at waypoint which is already reserved
This commit is contained in:
@@ -599,6 +599,10 @@ no_entry_cost: // jump here at the beginning if the node has no parent (it is th
|
||||
!IsWaitingPositionFree(v, t, td, _settings_game.pf.forbid_90_deg)) {
|
||||
extra_cost += Yapf().PfGetSettings().rail_lastred_penalty;
|
||||
}
|
||||
|
||||
if (v->current_order.GetWaypointFlags() & OWF_REVERSE && HasStationReservation(cur.tile)) {
|
||||
extra_cost += Yapf().PfGetSettings().rail_pbs_station_penalty * 4;
|
||||
}
|
||||
}
|
||||
/* Waypoint is also a good reason to finish. */
|
||||
end_segment_reason |= ESRB_WAYPOINT;
|
||||
|
Reference in New Issue
Block a user