(svn r21976) -Doc: Document several crash handling functions.

This commit is contained in:
alberth
2011-02-05 16:20:55 +00:00
parent 915e339d0f
commit b992a93996
4 changed files with 26 additions and 2 deletions

View File

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