diff options
author | hackykid <hackykid@openttd.org> | 2005-07-22 08:40:19 +0000 |
---|---|---|
committer | hackykid <hackykid@openttd.org> | 2005-07-22 08:40:19 +0000 |
commit | aa29ee6eda861ceac08d226a6d7e1de5dae74749 (patch) | |
tree | a3caf79bf281e825af72f9b3c43114b86409cb9a /train_cmd.c | |
parent | 559babcdc96d5e2de5e964c9d9b6109e4cfbcffc (diff) | |
download | openttd-aa29ee6eda861ceac08d226a6d7e1de5dae74749.tar.xz |
(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.
Diffstat (limited to 'train_cmd.c')
-rw-r--r-- | train_cmd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/train_cmd.c b/train_cmd.c index 471d15e59..f7ec9579f 100644 --- a/train_cmd.c +++ b/train_cmd.c @@ -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; |