order_gui.c
changeset 1530 caa16c506a22
parent 1363 01d3de5d8039
child 1542 2ca6d1624e6d
equal deleted inserted replaced
1529:be4a2259d2ff 1530:caa16c506a22
   165 		switch (GetTileType(tile)) {
   165 		switch (GetTileType(tile)) {
   166 		case MP_RAILWAY:
   166 		case MP_RAILWAY:
   167 			if (v->type == VEH_Train && _map_owner[tile] == _local_player) {
   167 			if (v->type == VEH_Train && _map_owner[tile] == _local_player) {
   168 				if ((_map5[tile]&0xFC)==0xC0) {
   168 				if ((_map5[tile]&0xFC)==0xC0) {
   169 					order.type = OT_GOTO_DEPOT;
   169 					order.type = OT_GOTO_DEPOT;
   170 					order.flags = OF_UNLOAD;
   170 					order.flags = OF_PART_OF_ORDERS;
   171 					order.station = GetDepotByTile(tile)->index;
   171 					order.station = GetDepotByTile(tile)->index;
   172 					return order;
   172 					return order;
   173 				}
   173 				}
   174 			}
   174 			}
   175 			break;
   175 			break;
   176 
   176 
   177 		case MP_STREET:
   177 		case MP_STREET:
   178 			if ((_map5[tile] & 0xF0) == 0x20 && v->type == VEH_Road && _map_owner[tile] == _local_player) {
   178 			if ((_map5[tile] & 0xF0) == 0x20 && v->type == VEH_Road && _map_owner[tile] == _local_player) {
   179 				order.type = OT_GOTO_DEPOT;
   179 				order.type = OT_GOTO_DEPOT;
   180 				order.flags = OF_UNLOAD;
   180 				order.flags = OF_PART_OF_ORDERS;
   181 				order.station = GetDepotByTile(tile)->index;
   181 				order.station = GetDepotByTile(tile)->index;
   182 				return order;
   182 				return order;
   183 			}
   183 			}
   184 			break;
   184 			break;
   185 
   185 
   186 		case MP_STATION:
   186 		case MP_STATION:
   187 			if (v->type != VEH_Aircraft) break;
   187 			if (v->type != VEH_Aircraft) break;
   188 			if ( IsAircraftHangarTile(tile) && _map_owner[tile] == _local_player) {
   188 			if ( IsAircraftHangarTile(tile) && _map_owner[tile] == _local_player) {
   189 				order.type = OT_GOTO_DEPOT;
   189 				order.type = OT_GOTO_DEPOT;
   190 				order.flags = OF_UNLOAD | OF_NON_STOP;
   190 				order.flags = OF_PART_OF_ORDERS | OF_NON_STOP;	//XXX - whats the nonstop stuff doing here?
   191 				order.station = _map2[tile];
   191 				order.station = _map2[tile];
   192 				return order;
   192 				return order;
   193 			}
   193 			}
   194 			break;
   194 			break;
   195 
   195 
   200 				switch (_map5[tile]) {
   200 				switch (_map5[tile]) {
   201 				case 0x81: tile--; break;
   201 				case 0x81: tile--; break;
   202 				case 0x83: tile-= TILE_XY(0,1); break;
   202 				case 0x83: tile-= TILE_XY(0,1); break;
   203 				}
   203 				}
   204 				order.type = OT_GOTO_DEPOT;
   204 				order.type = OT_GOTO_DEPOT;
   205 				order.flags = OF_UNLOAD;
   205 				order.flags = OF_PART_OF_ORDERS;
   206 				order.station = GetDepotByTile(tile)->index;
   206 				order.station = GetDepotByTile(tile)->index;
   207 				return order;
   207 				return order;
   208 			}
   208 			}
   209 
   209 
   210 			default:
   210 			default: