src/industry_cmd.cpp
branchnoai
changeset 9869 6404afe43575
parent 9837 c9ec4f82e0d0
child 10142 56ee7da4ad56
--- a/src/industry_cmd.cpp	Sun Apr 06 14:12:19 2008 +0000
+++ b/src/industry_cmd.cpp	Sun Apr 06 23:07:42 2008 +0000
@@ -303,6 +303,9 @@
 
 	DrawGroundSprite(image, pal);
 
+	/* If industries are transparent and invisible, do not draw the upper part */
+	if (IsInvisibilitySet(TO_INDUSTRIES)) return;
+
 	/* Add industry on top of the ground? */
 	image = dits->building.sprite;
 	if (image != 0) {
@@ -1964,13 +1967,13 @@
 		 */
 		const Order *o;
 		FOR_VEHICLE_ORDERS(v, o) {
-			if (o->type == OT_GOTO_STATION && !HasBit(o->flags, OF_TRANSFER)) {
+			if (o->IsType(OT_GOTO_STATION) && !HasBit(o->GetUnloadType(), OF_TRANSFER)) {
 				/* Vehicle visits a station to load or unload */
-				Station *st = GetStation(o->dest);
+				Station *st = GetStation(o->GetDestination());
 				if (!st->IsValid()) continue;
 
 				/* Same cargo produced by industry is dropped here => not serviced by vehicle v */
-				if (HasBit(o->flags, OF_UNLOAD) && !c_accepts) break;
+				if (HasBit(o->GetUnloadType(), OF_UNLOAD) && !c_accepts) break;
 
 				if (stations.find(st) != stations.end()) {
 					if (v->owner == _local_player) return 2; // Player services industry