(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:
hackykid
2005-07-22 08:40:19 +00:00
parent 559babcdc9
commit aa29ee6eda
4 changed files with 12 additions and 11 deletions

View File

@@ -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;