(svn r2674) - CodeChange: [pbs] Generalise the PSBISPbsDepot function so it can check if an arbitrary junction is a pbs junction. Preparations for making pbs more safe.
This commit is contained in:
@@ -1801,6 +1801,7 @@ static bool CheckTrainStayInDepot(Vehicle *v)
|
||||
return false;
|
||||
|
||||
if (v->u.rail.force_proceed == 0) {
|
||||
byte trackdir = GetVehicleTrackdir(v);
|
||||
if (++v->load_unload_time_rem < 37) {
|
||||
InvalidateWindowClasses(WC_TRAINS_LIST);
|
||||
return true;
|
||||
@@ -1808,8 +1809,7 @@ static bool CheckTrainStayInDepot(Vehicle *v)
|
||||
|
||||
v->load_unload_time_rem = 0;
|
||||
|
||||
if (PBSIsPbsDepot(v->tile)) {
|
||||
byte trackdir = GetVehicleTrackdir(v);
|
||||
if (PBSIsPbsSegment(v->tile, trackdir)) {
|
||||
NPFFindStationOrTileData fstd;
|
||||
NPFFoundTargetData ftd;
|
||||
|
||||
|
Reference in New Issue
Block a user