summaryrefslogtreecommitdiff
path: root/roadveh_cmd.c
diff options
context:
space:
mode:
authorbjarni <bjarni@openttd.org>2006-09-03 11:49:38 +0000
committerbjarni <bjarni@openttd.org>2006-09-03 11:49:38 +0000
commit6baf4888392407fdd8f08b948fd6a4087ebd107b (patch)
treecbbd6966c9d25e321e0ce148f06610e534e7422d /roadveh_cmd.c
parent23168f630952490f6a548f1889e1a3b035b29f1d (diff)
downloadopenttd-6baf4888392407fdd8f08b948fd6a4087ebd107b.tar.xz
(svn r6356) -Fix: FS#263 planes come out of hangar and drive back into hangar
Now all vehicles are serviced when it's time for service and they are in a depot This will avoid the goto depot order from ever showing up when in a depot
Diffstat (limited to 'roadveh_cmd.c')
-rw-r--r--roadveh_cmd.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/roadveh_cmd.c b/roadveh_cmd.c
index e35b6caad..e59d7c60c 100644
--- a/roadveh_cmd.c
+++ b/roadveh_cmd.c
@@ -1640,6 +1640,11 @@ static void CheckIfRoadVehNeedsService(Vehicle *v)
// If we already got a slot at a stop, use that FIRST, and go to a depot later
if (v->u.road.slot != NULL) return;
+ if (IsRoadVehInDepot(v)) {
+ VehicleServiceInDepot(v);
+ return;
+ }
+
// XXX If we already have a depot order, WHY do we search over and over?
depot = FindClosestRoadDepot(v);