~ubuntu-branches/debian/squeeze/openttd/squeeze

« back to all changes in this revision

Viewing changes to src/ai/api/ai_vehicle.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Matthijs Kooijman, Matthijs Kooijman
  • Date: 2009-10-01 22:52:59 UTC
  • mfrom: (1.1.8 upstream) (2.1.6 squeeze)
  • Revision ID: james.westby@ubuntu.com-20091001225259-5kpkp4sthbszpyif
[ Matthijs Kooijman ]
* New upstream release
* Use printf instead of echo -en in openttd-wrapper to make it POSIX
  compatible (Closes: #547758).
* Remove three patches that are now included in upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* $Id: ai_vehicle.cpp 16246 2009-05-06 22:31:52Z rubidium $ */
 
1
/* $Id: ai_vehicle.cpp 16803 2009-07-13 09:57:37Z rubidium $ */
2
2
 
3
3
/** @file ai_vehicle.cpp Implementation of AIVehicle. */
4
4
 
425
425
        Vehicle *v = ::GetVehicle(vehicle_id);
426
426
        return v->orders.list != NULL && v->orders.list->GetNumVehicles() > 1;
427
427
}
 
428
 
 
429
/* static */ int AIVehicle::GetReliability(VehicleID vehicle_id)
 
430
{
 
431
        if (!IsValidVehicle(vehicle_id)) return -1;
 
432
 
 
433
        const Vehicle *v = ::GetVehicle(vehicle_id);
 
434
        return v->reliability * 100 >> 16;
 
435
}