(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 8d004f3c63
commit 08a8c3a773
14 changed files with 55 additions and 63 deletions

View File

@@ -78,7 +78,13 @@ struct Aircraft FINAL : public SpecializedVehicle<Aircraft, VEH_AIRCRAFT> {
int GetSpeedOldUnits() const { return this->vcache.cached_max_speed * 10 / 128; }
int GetCurrentMaxSpeed() const { return this->GetSpeedOldUnits(); }
Money GetRunningCost() const;
bool IsInDepot() const { return (this->vehstatus & VS_HIDDEN) != 0 && IsHangarTile(this->tile); }
bool IsInDepot() const
{
assert(this->IsPrimaryVehicle());
return (this->vehstatus & VS_HIDDEN) != 0 && IsHangarTile(this->tile);
}
bool Tick();
void OnNewDay();
uint Crash(bool flooded = false);