(svn r21516) -Codechange: Add IsGroundVehicle function to the Vehicle class.
This commit is contained in:
@@ -359,6 +359,15 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the vehicle is a ground vehicle.
|
||||
* @return True iff the vehicle is a train or a road vehicle.
|
||||
*/
|
||||
FORCEINLINE bool IsGroundVehicle() const
|
||||
{
|
||||
return this->type == VEH_TRAIN || this->type == VEH_ROAD;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the speed in km-ish/h that can be sent into SetDParam for string processing.
|
||||
* @return the vehicle's speed
|
||||
|
||||
Reference in New Issue
Block a user