src/aircraft_cmd.cpp
changeset 6346 4aad704385e1
parent 6337 6f3f247870f1
child 6350 c644e180cdf8
equal deleted inserted replaced
6345:34bb16178197 6346:4aad704385e1
   967 		x = TileX(tile) * TILE_SIZE;
   967 		x = TileX(tile) * TILE_SIZE;
   968 		y = TileY(tile) * TILE_SIZE;
   968 		y = TileY(tile) * TILE_SIZE;
   969 	}
   969 	}
   970 
   970 
   971 	// get airport moving data
   971 	// get airport moving data
   972 	const AirportMovingData *amd = GetAirport(st->airport_type)->MovingData(v->u.air.pos);
   972 	const AirportFTAClass *afc = GetAirport(st->airport_type);
       
   973 	const AirportMovingData *amd = afc->MovingData(v->u.air.pos);
   973 
   974 
   974 	// Helicopter raise
   975 	// Helicopter raise
   975 	if (amd->flag & AMED_HELI_RAISE) {
   976 	if (amd->flag & AMED_HELI_RAISE) {
   976 		u = v->next->next;
   977 		u = v->next->next;
   977 
   978 
  1009 
  1010 
  1010 			// Vehicle is now at the airport.
  1011 			// Vehicle is now at the airport.
  1011 			v->tile = st->airport_tile;
  1012 			v->tile = st->airport_tile;
  1012 
  1013 
  1013 			// Find altitude of landing position.
  1014 			// Find altitude of landing position.
  1014 			z = GetSlopeZ(x, y) + 1;
  1015 			z = GetSlopeZ(x, y) + 1 + afc->delta_z;
  1015 			if (st->airport_type == AT_OILRIG) z += 54;
       
  1016 			if (st->airport_type == AT_HELIPORT) z += 60;
       
  1017 
  1016 
  1018 			if (z == v->z_pos) {
  1017 			if (z == v->z_pos) {
  1019 				u = v->next->next;
  1018 				u = v->next->next;
  1020 
  1019 
  1021 				// Increase speed of rotors. When speed is 80, we've landed.
  1020 				// Increase speed of rotors. When speed is 80, we've landed.