summaryrefslogtreecommitdiff
path: root/src/train_cmd.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/train_cmd.cpp')
-rw-r--r--src/train_cmd.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/train_cmd.cpp b/src/train_cmd.cpp
index 883f46fae..506845d59 100644
--- a/src/train_cmd.cpp
+++ b/src/train_cmd.cpp
@@ -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;