(svn r21516) -Codechange: Add IsGroundVehicle function to the Vehicle class.

This commit is contained in:
terkhen
2010-12-14 21:26:03 +00:00
parent 57790abb75
commit 47c9189002
9 changed files with 27 additions and 18 deletions

View File

@@ -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