summaryrefslogtreecommitdiff
path: root/src/water_cmd.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/water_cmd.cpp')
-rw-r--r--src/water_cmd.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/water_cmd.cpp b/src/water_cmd.cpp
index f409c250e..3ad2b235f 100644
--- a/src/water_cmd.cpp
+++ b/src/water_cmd.cpp
@@ -887,7 +887,10 @@ static void FloodVehicle(Vehicle *v)
switch (v->type) {
default: NOT_REACHED();
case VEH_TRAIN:
- if (IsFrontEngine(v)) pass += 4; // driver
+ if (IsFrontEngine(v)) {
+ pass += 4; // driver
+ FreeTrainTrackReservation(v);
+ }
v->u.rail.crash_anim_pos = 4000; // max 4440, disappear pretty fast
InvalidateWindowClassesData(WC_TRAINS_LIST, 0);
break;