src/water_cmd.cpp
branchnoai
changeset 9476 1d1ed96f32ad
parent 6612 b511ba22a541
child 6719 4cc327ad39d5
child 6923 6913c8a82cc0
child 9574 698395509d12
--- a/src/water_cmd.cpp	Mon Mar 19 12:30:11 2007 +0000
+++ b/src/water_cmd.cpp	Mon Mar 19 12:49:27 2007 +0000
@@ -614,8 +614,7 @@
 
 		if (v->type == VEH_ROAD) { // flood bus/truck
 			pass = 1; // driver
-			if (v->cargo_type == CT_PASSENGERS)
-				pass += v->cargo_count;
+			if (IsCargoInClass(v->cargo_type, CC_PASSENGERS)) pass += v->cargo_count;
 
 			v->vehstatus |= VS_CRASHED;
 			v->u.road.crashed_ctr = 2000; // max 2220, disappear pretty fast
@@ -629,7 +628,7 @@
 
 			// crash all wagons, and count passangers
 			BEGIN_ENUM_WAGONS(v)
-				if (v->cargo_type == CT_PASSENGERS) pass += v->cargo_count;
+				if (IsCargoInClass(v->cargo_type, CC_PASSENGERS)) pass += v->cargo_count;
 				v->vehstatus |= VS_CRASHED;
 				MarkAllViewportsDirty(v->left_coord, v->top_coord, v->right_coord + 1, v->bottom_coord + 1);
 			END_ENUM_WAGONS(v)