File diff r2847:8df2aeef9e0e → r2848:ae67043fa1f1
aircraft_cmd.c
Show inline comments
 
@@ -1447,13 +1447,13 @@ static void AircraftEventHandler_HeliTak
 
	v->u.air.state = FLYING;
 
	// get the next position to go to, differs per airport
 
	AircraftNextAirportPos_and_Order(v);
 

	
 
	// check if the aircraft needs to be replaced or renewed and send it to a hangar if needed
 
	if (v->owner == _local_player && (
 
				EngineHasReplacement(p, v->engine_type) ||
 
				EngineHasReplacementForPlayer(p, v->engine_type) ||
 
				(p->engine_renew && v->age - v->max_age > p->engine_renew_months * 30)
 
			)) {
 
		_current_player = _local_player;
 
		DoCommandP(v->tile, v->index, 1, NULL, CMD_SEND_AIRCRAFT_TO_HANGAR | CMD_SHOW_NO_ERROR);
 
		_current_player = OWNER_NONE;
 
	}
 
@@ -1511,13 +1511,13 @@ static void AircraftEventHandler_Landing
 
	const Player* p = GetPlayer(v->owner);
 
	AircraftLandAirplane(v);  // maybe crash airplane
 
	v->u.air.state = ENDLANDING;
 
	// check if the aircraft needs to be replaced or renewed and send it to a hangar if needed
 
	if (v->current_order.type != OT_GOTO_DEPOT && v->owner == _local_player) {
 
		// only the vehicle owner needs to calculate the rest (locally)
 
		if (EngineHasReplacement(p, v->engine_type) ||
 
		if (EngineHasReplacementForPlayer(p, v->engine_type) ||
 
			(p->engine_renew && v->age - v->max_age > (p->engine_renew_months * 30))) {
 
			// send the aircraft to the hangar at next airport (bit 17 set)
 
			_current_player = _local_player;
 
			DoCommandP(v->tile, v->index, 1 << 16, NULL, CMD_SEND_AIRCRAFT_TO_HANGAR | CMD_SHOW_NO_ERROR);
 
			_current_player = OWNER_NONE;
 
		}