@@ -112,7 +112,7 @@ struct RoadVehicle FINAL : public Ground
int GetDisplayMaxSpeed() const { return this->vcache.cached_max_speed / 2; }
Money GetRunningCost() const;
int GetDisplayImageWidth(Point *offset = NULL) const;
bool IsInDepot() const { return this->state == RVSB_IN_DEPOT; }
bool IsInDepot() const;
bool IsStoppedInDepot() const;
bool Tick();
void OnNewDay();
@@ -308,10 +308,15 @@ CommandCost CmdBuildRoadVehicle(TileInde
bool RoadVehicle::IsStoppedInDepot() const
{
TileIndex tile = this->tile;
if (this->IsFrontEngine() && !(this->vehstatus & VS_STOPPED)) return false;
return this->IsInDepot();
}
bool RoadVehicle::IsInDepot() const
if (!IsRoadDepotTile(tile)) return false;
for (const RoadVehicle *v = this; v != NULL; v = v->Next()) {
if (v->state != RVSB_IN_DEPOT || v->tile != tile) return false;
Status change: