(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

@@ -3299,6 +3299,10 @@ static void DeleteLastWagon(Train *v)
}
}
/**
* Rotate all vehicles of a (crashed) train chain randomly to animate the crash.
* @param v First crashed vehicle.
*/
static void ChangeTrainDirRandomly(Train *v)
{
static const DirDiff delta[] = {
@@ -3319,6 +3323,11 @@ static void ChangeTrainDirRandomly(Train *v)
} while ((v = v->Next()) != NULL);
}
/**
* Handle a crashed train.
* @param v First train vehicle.
* @return %Vehicle chain still exists.
*/
static bool HandleCrashedTrain(Train *v)
{
int state = ++v->crash_anim_pos;