|
@@ -95,50 +95,48 @@ struct Train FINAL : public GroundVehicl
|
|
|
void UpdateDeltaXY(Direction direction);
|
|
|
ExpensesType GetExpenseType(bool income) const { return income ? EXPENSES_TRAIN_INC : EXPENSES_TRAIN_RUN; }
|
|
|
void PlayLeaveStationSound() const;
|
|
|
bool IsPrimaryVehicle() const { return this->IsFrontEngine(); }
|
|
|
SpriteID GetImage(Direction direction, EngineImageType image_type) const;
|
|
|
int GetDisplaySpeed() const { return this->gcache.last_speed; }
|
|
|
int GetDisplayMaxSpeed() const { return this->vcache.cached_max_speed; }
|
|
|
Money GetRunningCost() const;
|
|
|
int GetDisplayImageWidth(Point *offset = NULL) const;
|
|
|
bool IsInDepot() const;
|
|
|
bool IsStoppedInDepot() const;
|
|
|
bool Tick();
|
|
|
void OnNewDay();
|
|
|
uint Crash(bool flooded = false);
|
|
|
Trackdir GetVehicleTrackdir() const;
|
|
|
TileIndex GetOrderStationLocation(StationID station);
|
|
|
bool FindClosestDepot(TileIndex *location, DestinationID *destination, bool *reverse);
|
|
|
|
|
|
void ReserveTrackUnderConsist() const;
|
|
|
|
|
|
int GetCurveSpeedLimit() const;
|
|
|
|
|
|
void ConsistChanged(bool same_length);
|
|
|
|
|
|
void RailtypeChanged();
|
|
|
|
|
|
int UpdateSpeed();
|
|
|
|
|
|
void UpdateAcceleration();
|
|
|
|
|
|
int GetCurrentMaxSpeed() const;
|
|
|
|
|
|
/**
|
|
|
* Get the next real (non-articulated part and non rear part of dualheaded engine) vehicle in the consist.
|
|
|
* @return Next vehicle in the consist.
|
|
|
*/
|
|
|
inline Train *GetNextUnit() const
|
|
|
{
|
|
|
Train *v = this->GetNextVehicle();
|
|
|
if (v != NULL && v->IsRearDualheaded()) v = v->GetNextVehicle();
|
|
|
|
|
|
return v;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* Get the previous real (non-articulated part and non rear part of dualheaded engine) vehicle in the consist.
|
|
|
* @return Previous vehicle in the consist.
|
|
|
*/
|
|
|
inline Train *GetPrevUnit()
|
|
|
{
|