summaryrefslogtreecommitdiff
path: root/src/water_cmd.cpp
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2008-05-21 12:06:05 +0000
committerpeter1138 <peter1138@openttd.org>2008-05-21 12:06:05 +0000
commit42f78d2fc3855b0d358197745b0d0ba099ef066c (patch)
tree3464efc29253f5fc621e220954d19cca7ae3d056 /src/water_cmd.cpp
parent41adc28093b5c92343ffe9129c48f8c364e8d88b (diff)
downloadopenttd-42f78d2fc3855b0d358197745b0d0ba099ef066c.tar.xz
(svn r13205) -Codechange: Remove unnecessary code-style-buggering-up macro.
Diffstat (limited to 'src/water_cmd.cpp')
-rw-r--r--src/water_cmd.cpp14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/water_cmd.cpp b/src/water_cmd.cpp
index 0f41878f2..fa6a654b4 100644
--- a/src/water_cmd.cpp
+++ b/src/water_cmd.cpp
@@ -819,19 +819,15 @@ static void FloodVehicle(Vehicle *v)
if (v->z_pos != airport->delta_z + 1) return;
}
- Vehicle *u;
if (v->type != VEH_AIRCRAFT) v = v->First();
- u = v;
/* crash all wagons, and count passengers */
- BEGIN_ENUM_WAGONS(v)
- if (IsCargoInClass(v->cargo_type, CC_PASSENGERS)) pass += v->cargo.Count();
- v->vehstatus |= VS_CRASHED;
- MarkSingleVehicleDirty(v);
- END_ENUM_WAGONS(v)
-
- v = u;
+ for (Vehicle *u = v; u != NULL; u = u->Next()) {
+ if (IsCargoInClass(u->cargo_type, CC_PASSENGERS)) pass += u->cargo.Count();
+ u->vehstatus |= VS_CRASHED;
+ MarkSingleVehicleDirty(u);
+ }
switch (v->type) {
default: NOT_REACHED();