(svn r21517) -Codechange: Add IsGroundVehicle function to the Engine class.

This commit is contained in:
terkhen
2010-12-14 21:27:30 +00:00
parent 79e2b3153d
commit d6959dcc6b
2 changed files with 12 additions and 3 deletions

View File

@@ -87,6 +87,15 @@ struct Engine : EnginePool::PoolItem<&_engine_pool> {
uint GetDisplayWeight() const;
uint GetDisplayMaxTractiveEffort() const;
Date GetLifeLengthInDays() const;
/**
* Check if the engine is a ground vehicle.
* @return True iff the engine is a train or a road vehicle.
*/
FORCEINLINE bool IsGroundVehicle() const
{
return this->type == VEH_TRAIN || this->type == VEH_ROAD;
}
};
struct EngineIDMapping {