diff options
author | terkhen <terkhen@openttd.org> | 2011-01-19 20:04:09 +0000 |
---|---|---|
committer | terkhen <terkhen@openttd.org> | 2011-01-19 20:04:09 +0000 |
commit | d426906a010f9e7355986400edcbe1d84b6a70e2 (patch) | |
tree | cbcbd03e43978909338f73f3dbb075e01d26216e /src/roadveh.h | |
parent | be44f1306f633448e88b0a460205b1a6af927218 (diff) | |
download | openttd-d426906a010f9e7355986400edcbe1d84b6a70e2.tar.xz |
(svn r21862) -Codechange: Unify subtype handling between road vehicles and trains.
Diffstat (limited to 'src/roadveh.h')
-rw-r--r-- | src/roadveh.h | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/src/roadveh.h b/src/roadveh.h index 2cb920c61..92a5eab9e 100644 --- a/src/roadveh.h +++ b/src/roadveh.h @@ -75,12 +75,6 @@ static const uint RVC_TURN_AROUND_START_FRAME_SHORT_TRAM = 16; static const uint RVC_DRIVE_THROUGH_STOP_FRAME = 11; static const uint RVC_DEPOT_STOP_FRAME = 11; -enum RoadVehicleSubType { - RVST_FRONT, - RVST_ARTIC_PART, -}; - - void RoadVehUpdateCache(RoadVehicle *v); /** @@ -128,34 +122,6 @@ struct RoadVehicle : public GroundVehicle<RoadVehicle, VEH_ROAD> { int GetCurrentMaxSpeed() const; - /** - * Check if vehicle is a front engine - * @return Returns true if vehicle is a front engine - */ - FORCEINLINE bool IsFrontEngine() const { return this->subtype == RVST_FRONT; } - - /** - * Set front engine state - */ - FORCEINLINE void SetFrontEngine() { this->subtype = RVST_FRONT; } - - /** - * Check if vehicl is an articulated part of an engine - * @return Returns true if vehicle is an articulated part - */ - FORCEINLINE bool IsArticulatedPart() const { return this->subtype == RVST_ARTIC_PART; } - - /** - * Set a vehicle to be an articulated part - */ - FORCEINLINE void SetArticulatedPart() { this->subtype = RVST_ARTIC_PART; } - - /** - * Check if an engine has an articulated part. - * @return True if the engine has an articulated part. - */ - FORCEINLINE bool HasArticulatedPart() const { return this->Next() != NULL && this->Next()->IsArticulatedPart(); } - protected: // These functions should not be called outside acceleration code. /** |