File diff r4351:04a502e12263 → r4352:460a517b040f
aircraft_cmd.c
Show inline comments
 
@@ -423,13 +423,13 @@ static void DoDeleteAircraft(Vehicle *v)
 
 * @param p2 unused
 
 */
 
int32 CmdSellAircraft(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
 
{
 
	Vehicle *v;
 

	
 
	if (!IsVehicleIndex(p1)) return CMD_ERROR;
 
	if (!IsValidVehicleID(p1)) return CMD_ERROR;
 

	
 
	v = GetVehicle(p1);
 

	
 
	if (v->type != VEH_Aircraft || !CheckOwnership(v->owner)) return CMD_ERROR;
 
	if (!IsAircraftInHangarStopped(v)) return_cmd_error(STR_A01B_AIRCRAFT_MUST_BE_STOPPED);
 

	
 
@@ -453,13 +453,13 @@ int32 CmdSellAircraft(TileIndex tile, ui
 
 */
 
int32 CmdStartStopAircraft(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
 
{
 
	Vehicle *v;
 
	uint16 callback;
 

	
 
	if (!IsVehicleIndex(p1)) return CMD_ERROR;
 
	if (!IsValidVehicleID(p1)) return CMD_ERROR;
 

	
 
	v = GetVehicle(p1);
 

	
 
	if (v->type != VEH_Aircraft || !CheckOwnership(v->owner)) return CMD_ERROR;
 

	
 
	// cannot stop airplane when in flight, or when taking off / landing
 
@@ -497,13 +497,13 @@ int32 CmdStartStopAircraft(TileIndex til
 
 * - p2 (bit 17) - aircraft will try to goto a depot at the airport specified by low word of p2 XXX - Not Used
 
 */
 
int32 CmdSendAircraftToHangar(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
 
{
 
	Vehicle *v;
 

	
 
	if (!IsVehicleIndex(p1)) return CMD_ERROR;
 
	if (!IsValidVehicleID(p1)) return CMD_ERROR;
 

	
 
	v = GetVehicle(p1);
 

	
 
	if (v->type != VEH_Aircraft || !CheckOwnership(v->owner)) return CMD_ERROR;
 

	
 
	if (v->current_order.type == OT_GOTO_DEPOT && p2 == 0) {
 
@@ -565,13 +565,13 @@ int32 CmdRefitAircraft(TileIndex tile, u
 
	int32 cost;
 
	CargoID new_cid = GB(p2, 0, 8);
 
	byte new_subtype = GB(p2, 8, 8);
 
	const AircraftVehicleInfo *avi;
 
	uint16 callback = CALLBACK_FAILED;
 

	
 
	if (!IsVehicleIndex(p1)) return CMD_ERROR;
 
	if (!IsValidVehicleID(p1)) return CMD_ERROR;
 

	
 
	v = GetVehicle(p1);
 

	
 
	if (v->type != VEH_Aircraft || !CheckOwnership(v->owner)) return CMD_ERROR;
 
	if (!IsAircraftInHangarStopped(v)) return_cmd_error(STR_A01B_AIRCRAFT_MUST_BE_STOPPED);