(svn r12629) -Codechange: Split VehicleNeedsService() into Vehicle::NeedsServicing() and Vehicle::NeedsAutomaticServicing().

-Fix (r11052): Disable servicing by service-interval if a vehicle has depot orders.
This commit is contained in:
frosch
2008-04-08 15:48:32 +00:00
parent 71a2dd21fd
commit 96700d5605
8 changed files with 35 additions and 17 deletions

View File

@@ -1911,7 +1911,7 @@ void RoadVehicle::Tick()
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 || _patches.servint_roadveh == 0 || !VehicleNeedsService(v)) return;
if (v->u.road.slot != NULL || _patches.servint_roadveh == 0 || !v->NeedsAutomaticServicing()) return;
if (v->IsInDepot()) {
VehicleServiceInDepot(v);
return;