diff options
author | terkhen <terkhen@openttd.org> | 2010-03-06 12:44:30 +0000 |
---|---|---|
committer | terkhen <terkhen@openttd.org> | 2010-03-06 12:44:30 +0000 |
commit | 07c373d60a9f2d262617dbfdf719499687aeea73 (patch) | |
tree | d38dbb686053c1db2c99cf3aa67717ec04d26f1e /src/train.h | |
parent | e4a5a556b4d9d6b74f2fcd2330997abb65a68d3b (diff) | |
download | openttd-07c373d60a9f2d262617dbfdf719499687aeea73.tar.xz |
(svn r19339) -Codechange: Move acceleration functions to GroundVehicle.
Diffstat (limited to 'src/train.h')
-rw-r--r-- | src/train.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/train.h b/src/train.h index bbb8ab3e9..30226e605 100644 --- a/src/train.h +++ b/src/train.h @@ -110,6 +110,8 @@ struct Train : public GroundVehicle<Train, VEH_TRAIN> { /** We want to 'destruct' the right class. */ virtual ~Train() { this->PreDestructor(); } + friend struct GroundVehicle<Train, VEH_TRAIN>; // GroundVehicle needs to use the acceleration functions defined at Train. + const char *GetTypeString() const { return "train"; } void MarkDirty(); void UpdateDeltaXY(Direction direction); @@ -135,15 +137,12 @@ struct Train : public GroundVehicle<Train, VEH_TRAIN> { int GetCurveSpeedLimit() const; void ConsistChanged(bool same_length); - void CargoChanged(); - void PowerChanged(); int UpdateSpeed(); void UpdateAcceleration(); int GetCurrentMaxSpeed() const; - int GetAcceleration() const; /** * enum to handle train subtypes |