order_gui.c
changeset 560 60e198893a41
parent 559 219cbdcf31b4
child 679 04ca2cd69420
equal deleted inserted replaced
559:219cbdcf31b4 560:60e198893a41
   170 	// check depot first
   170 	// check depot first
   171 	if (_patches.gotodepot) {
   171 	if (_patches.gotodepot) {
   172 		switch(GET_TILETYPE(tile)) {
   172 		switch(GET_TILETYPE(tile)) {
   173 		case MP_RAILWAY:
   173 		case MP_RAILWAY:
   174 			if (v->type == VEH_Train && _map_owner[tile] == _local_player) {
   174 			if (v->type == VEH_Train && _map_owner[tile] == _local_player) {
   175 				if ((_map5[tile]&0xFC)==0xC0)
   175 				if ((_map5[tile]&0xFC)==0xC0) {
   176 					order.type = OT_GOTO_DEPOT;
   176 					order.type = OT_GOTO_DEPOT;
   177 					order.flags = OF_UNLOAD;
   177 					order.flags = OF_UNLOAD;
   178 					order.station = GetDepotByTile(tile);
   178 					order.station = GetDepotByTile(tile);
   179 					return order;
   179 					return order;
       
   180 				}
   180 			}
   181 			}
   181 			break;
   182 			break;
   182 
   183 
   183 		case MP_STREET:
   184 		case MP_STREET:
   184 			if ((_map5[tile] & 0xF0) == 0x20 && v->type == VEH_Road && _map_owner[tile] == _local_player)
   185 			if ((_map5[tile] & 0xF0) == 0x20 && v->type == VEH_Road && _map_owner[tile] == _local_player) {
   185 				order.type = OT_GOTO_DEPOT;
   186 				order.type = OT_GOTO_DEPOT;
   186 				order.flags = OF_UNLOAD;
   187 				order.flags = OF_UNLOAD;
   187 				order.station = GetDepotByTile(tile);
   188 				order.station = GetDepotByTile(tile);
   188 				return order;
   189 				return order;
       
   190 			}
   189 			break;
   191 			break;
   190 
   192 
   191 		case MP_STATION:
   193 		case MP_STATION:
   192 			if (v->type != VEH_Aircraft) break;
   194 			if (v->type != VEH_Aircraft) break;
   193 			if ( IsAircraftHangarTile(tile) && _map_owner[tile] == _local_player) {
   195 			if ( IsAircraftHangarTile(tile) && _map_owner[tile] == _local_player) {
   194 				order.type = OT_GOTO_DEPOT;
   196 				order.type = OT_GOTO_DEPOT;
   195 				order.flags = OF_UNLOAD | OF_NON_STOP;
   197 				order.flags = OF_UNLOAD | OF_NON_STOP;
   196 				order.station = _map2[tile];
   198 				order.station = _map2[tile];
   197 				return order;
   199 				return order;
   198 				}
   200 			}
   199 			break;
   201 			break;
   200 
   202 
   201 		case MP_WATER:
   203 		case MP_WATER:
   202 			if (v->type != VEH_Ship) break;
   204 			if (v->type != VEH_Ship) break;
   203 			if ( IsShipDepotTile(tile) && _map_owner[tile] == _local_player) {
   205 			if ( IsShipDepotTile(tile) && _map_owner[tile] == _local_player) {