(svn r21976) -Doc: Document several crash handling functions.
This commit is contained in:
@@ -415,6 +415,10 @@ FORCEINLINE int RoadVehicle::GetCurrentMaxSpeed() const
|
||||
return max_speed;
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete last vehicle of a chain road vehicles.
|
||||
* @param v First roadvehicle.
|
||||
*/
|
||||
static void DeleteLastRoadVeh(RoadVehicle *v)
|
||||
{
|
||||
Vehicle *u = v;
|
||||
@@ -441,6 +445,11 @@ static void RoadVehSetRandomDirection(RoadVehicle *v)
|
||||
} while ((v = v->Next()) != NULL);
|
||||
}
|
||||
|
||||
/**
|
||||
* Road vehicle chain has crashed.
|
||||
* @param v First roadvehicle.
|
||||
* @return whether the chain still exists.
|
||||
*/
|
||||
static bool RoadVehIsCrashed(RoadVehicle *v)
|
||||
{
|
||||
v->crashed_ctr++;
|
||||
@@ -457,6 +466,12 @@ static bool RoadVehIsCrashed(RoadVehicle *v)
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check routine whether a road and a train vehicle have collided.
|
||||
* @param v %Train vehicle to test.
|
||||
* @param data Road vehicle to test.
|
||||
* @return %Train vehicle if the vehicles collided, else \c NULL.
|
||||
*/
|
||||
static Vehicle *EnumCheckRoadVehCrashTrain(Vehicle *v, void *data)
|
||||
{
|
||||
const Vehicle *u = (Vehicle*)data;
|
||||
|
Reference in New Issue
Block a user