src/newgrf_engine.cpp
changeset 8654 d5968016055b
parent 8614 4c67a883c4c4
child 8665 1afa0aa5b77f
--- a/src/newgrf_engine.cpp	Thu Feb 28 17:34:34 2008 +0000
+++ b/src/newgrf_engine.cpp	Thu Feb 28 21:44:13 2008 +0000
@@ -512,12 +512,13 @@
 			memset(common_subtypes, 0, sizeof(common_subtypes));
 
 			for (u = v; u != NULL; u = u->Next()) {
+				if (v->type == VEH_TRAIN) user_def_data |= u->u.rail.user_def_data;
+
 				/* Skip empty engines */
 				if (u->cargo_cap == 0) continue;
 
 				cargo_classes |= GetCargo(u->cargo_type)->classes;
 				common_cargos[u->cargo_type]++;
-				if (v->type == VEH_TRAIN) user_def_data |= u->u.rail.user_def_data;
 				common_subtypes[u->cargo_subtype]++;
 			}