diff --git a/src/pathfinder/yapf/yapf_costrail.hpp b/src/pathfinder/yapf/yapf_costrail.hpp index 81966b29c3..d5f7c04744 100644 --- a/src/pathfinder/yapf/yapf_costrail.hpp +++ b/src/pathfinder/yapf/yapf_costrail.hpp @@ -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;