(svn r21466) -Codechange: make VehicleHasDepotOrders a function of Vehicle.

This commit is contained in:
rubidium
2010-12-11 13:48:30 +00:00
parent ff16d3a2f8
commit d5bdeb3589
4 changed files with 7 additions and 10 deletions

View File

@@ -158,8 +158,8 @@ bool Vehicle::NeedsServicing() const
bool Vehicle::NeedsAutomaticServicing() const
{
if (_settings_game.order.gotodepot && VehicleHasDepotOrders(this)) return false;
if (this->current_order.IsType(OT_LOADING)) return false;
if (_settings_game.order.gotodepot && this->HasDepotOrder()) return false;
if (this->current_order.IsType(OT_LOADING)) return false;
if (this->current_order.IsType(OT_GOTO_DEPOT) && this->current_order.GetDepotOrderType() != ODTFB_SERVICE) return false;
return NeedsServicing();
}