(svn r24384) -Fix [FS#5188-ish]: Make IsInDepot() functions behave consistent across vehicle types and add IsChainInDepot instead, if that is what shall be checked.

This commit is contained in:
frosch
2012-07-07 15:39:46 +00:00
parent ff95e3edaf
commit 358a2bd6ed
14 changed files with 55 additions and 63 deletions

View File

@@ -182,7 +182,7 @@
/* static */ bool ScriptVehicle::IsInDepot(VehicleID vehicle_id)
{
if (!IsValidVehicle(vehicle_id)) return false;
return ::Vehicle::Get(vehicle_id)->IsInDepot();
return ::Vehicle::Get(vehicle_id)->IsChainInDepot();
}
/* static */ bool ScriptVehicle::IsStoppedInDepot(VehicleID vehicle_id)