diff options
Diffstat (limited to 'src/water_cmd.cpp')
-rw-r--r-- | src/water_cmd.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/water_cmd.cpp b/src/water_cmd.cpp index 3034f98cd..d416cd5d7 100644 --- a/src/water_cmd.cpp +++ b/src/water_cmd.cpp @@ -813,11 +813,12 @@ static void FloodVehicle(Vehicle *v) break; } - case VEH_ROAD: - if (IsRoadVehFront(v)) pass += 1; // driver - RoadVehicle::From(v)->crashed_ctr = 2000; // max 2220, disappear pretty fast + case VEH_ROAD: { + RoadVehicle *rv = RoadVehicle::From(v); + if (rv->IsRoadVehFront()) pass += 1; // driver + rv->crashed_ctr = 2000; // max 2220, disappear pretty fast InvalidateWindowClassesData(WC_ROADVEH_LIST, 0); - break; + } break; case VEH_AIRCRAFT: pass += 2; // driver |