aircraft_cmd.c
changeset 1926 68d60188a22f
parent 1901 fb05044cf5c3
child 1977 4392ae3d8e31
equal deleted inserted replaced
1925:e4bbd7fc2353 1926:68d60188a22f
   254 		v->subtype = (avi->subtype & 1) == 0 ? 0 : 2;
   254 		v->subtype = (avi->subtype & 1) == 0 ? 0 : 2;
   255 		v->value = value;
   255 		v->value = value;
   256 
   256 
   257 		u->subtype = 4;
   257 		u->subtype = 4;
   258 
   258 
   259 		e = &_engines[p1];
   259 		e = GetEngine(p1);
   260 		v->reliability = e->reliability;
   260 		v->reliability = e->reliability;
   261 		v->reliability_spd_dec = e->reliability_spd_dec;
   261 		v->reliability_spd_dec = e->reliability_spd_dec;
   262 		v->max_age = e->lifelength * 366;
   262 		v->max_age = e->lifelength * 366;
   263 
   263 
   264 		_new_aircraft_id = v->index;
   264 		_new_aircraft_id = v->index;
  1468 		if (_patches.serviceathelipad) {
  1468 		if (_patches.serviceathelipad) {
  1469 			if (v->subtype == 0 && Airport->helipads != NULL) {
  1469 			if (v->subtype == 0 && Airport->helipads != NULL) {
  1470 				// an exerpt of ServiceAircraft, without the invisibility stuff
  1470 				// an exerpt of ServiceAircraft, without the invisibility stuff
  1471 				v->date_of_last_service = _date;
  1471 				v->date_of_last_service = _date;
  1472 				v->breakdowns_since_last_service = 0;
  1472 				v->breakdowns_since_last_service = 0;
  1473 				v->reliability = _engines[v->engine_type].reliability;
  1473 				v->reliability = GetEngine(v->engine_type)->reliability;
  1474 				InvalidateWindow(WC_VEHICLE_DETAILS, v->index);
  1474 				InvalidateWindow(WC_VEHICLE_DETAILS, v->index);
  1475 			}
  1475 			}
  1476 		}
  1476 		}
  1477 		return;
  1477 		return;
  1478 	}
  1478 	}