diff options
Diffstat (limited to 'src/roadveh_cmd.cpp')
-rw-r--r-- | src/roadveh_cmd.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/roadveh_cmd.cpp b/src/roadveh_cmd.cpp index 44717dda6..b3d196c11 100644 --- a/src/roadveh_cmd.cpp +++ b/src/roadveh_cmd.cpp @@ -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; |