src/ai/default/default.cpp
changeset 8840 332412c2e9c1
parent 8839 6337281b393b
child 8843 45fdf630deaa
--- a/src/ai/default/default.cpp	Sun Apr 06 07:22:26 2008 +0000
+++ b/src/ai/default/default.cpp	Sun Apr 06 07:48:51 2008 +0000
@@ -263,8 +263,8 @@
 
 	FOR_VEHICLE_ORDERS(v, o) {
 		if (!o->IsValid()) continue;
-		if (!IsValidStationID(o->dest)) continue;
-		const Station *st = GetStation(o->dest);
+		if (!IsValidStationID(o->GetDestination())) continue;
+		const Station *st = GetStation(o->GetDestination());
 		if (!(st->facilities & FACIL_AIRPORT)) continue;
 
 		AirportFTAClass::Flags flags = st->Airport()->flags;
@@ -3662,7 +3662,7 @@
 	byte *in_use = MallocT<byte>(GetMaxStationIndex() + 1);
 	memset(in_use, 0, GetMaxStationIndex() + 1);
 	FOR_ALL_ORDERS(ord) {
-		if (ord->IsType(OT_GOTO_STATION)) in_use[ord->dest] = 1;
+		if (ord->IsType(OT_GOTO_STATION)) in_use[ord->GetDestination()] = 1;
 	}
 
 	// Go through all stations and delete those that aren't in use