economy.c
changeset 1067 a083a6dd1419
parent 1019 6363b8a4273e
child 1093 e8d26c7dc42f
--- a/economy.c	Wed Jan 19 13:31:46 2005 +0000
+++ b/economy.c	Wed Jan 19 19:15:03 2005 +0000
@@ -128,7 +128,7 @@
 		FOR_ALL_VEHICLES(v) {
 			if (v->owner != owner)
 				continue;
-			if ((v->type == VEH_Train && v->subtype == 0) ||
+			if ((v->type == VEH_Train && v->subtype == TS_Front_Engine) ||
 					v->type == VEH_Road ||
 					(v->type == VEH_Aircraft && v->subtype<=2) ||
 					v->type == VEH_Ship) {
@@ -310,7 +310,7 @@
 		// Determine Ids for the new vehicles
 		FOR_ALL_VEHICLES(v) {
 			if (v->owner == new_player) {
-				if (v->type == VEH_Train && v->subtype == 0)
+				if (v->type == VEH_Train && v->subtype == TS_Front_Engine)
 					num_train++;
 				else if (v->type == VEH_Road)
 					num_road++;
@@ -330,7 +330,7 @@
 					DeleteVehicle(v);
 				} else {
 					v->owner = new_player;
-					if (v->type == VEH_Train && v->subtype == 0)
+					if (v->type == VEH_Train && v->subtype == TS_Front_Engine)
 						v->unitnumber = ++num_train;
 					else if (v->type == VEH_Road)
 						v->unitnumber = ++num_road;
@@ -1297,7 +1297,7 @@
 	}
 
 	FOR_ALL_VEHICLES(x) {
-		if ((x->type != VEH_Train || x->subtype == 0) && // for all locs
+		if ((x->type != VEH_Train || x->subtype == TS_Front_Engine) && // for all locs
 				u->last_station_visited == x->last_station_visited && // at the same station
 				!(x->vehstatus & VS_STOPPED) && // not stopped
 				x->current_order.type == OT_LOADING && // loading