File diff r4844:dcf812ad20ab → r4845:2200ed004c20
aircraft_cmd.c
Show inline comments
 
@@ -618,25 +618,25 @@ int32 CmdRefitAircraft(TileIndex tile, u
 
	}
 

	
 
	if (callback == CALLBACK_FAILED) {
 
		/* If the callback failed, or wasn't executed, use the aircraft's
 
		 * default cargo capacity */
 
		pass = AircraftDefaultCargoCapacity(new_cid, v->engine_type);
 
	} else {
 
		pass = callback;
 
	}
 
	_returned_refit_capacity = pass;
 

	
 
	cost = 0;
 
	if (IS_HUMAN_PLAYER(v->owner) && new_cid != v->cargo_type) {
 
	if (IsHumanPlayer(v->owner) && new_cid != v->cargo_type) {
 
		cost = GetRefitCost(v->engine_type);
 
	}
 

	
 
	if (flags & DC_EXEC) {
 
		Vehicle *u;
 
		v->cargo_cap = pass;
 

	
 
		u = v->next;
 
		mail = (new_cid != CT_PASSENGERS) ? 0 : avi->mail_capacity;
 
		u->cargo_cap = mail;
 
		if (v->cargo_type == new_cid) {
 
			v->cargo_count = min(pass, v->cargo_count);