--- a/aircraft_cmd.c Sun Mar 12 10:15:36 2006 +0000
+++ b/aircraft_cmd.c Sun Mar 12 12:19:25 2006 +0000
@@ -315,12 +315,7 @@
bool CheckStoppedInHangar(const Vehicle* v)
{
- if (!(v->vehstatus & VS_STOPPED) || !IsAircraftHangarTile(v->tile)) {
- _error_message = STR_A01B_AIRCRAFT_MUST_BE_STOPPED;
- return false;
- }
-
- return true;
+ return v->vehstatus & VS_STOPPED && IsAircraftHangarTile(v->tile);
}
@@ -346,8 +341,8 @@
v = GetVehicle(p1);
- if (v->type != VEH_Aircraft || !CheckOwnership(v->owner) || !CheckStoppedInHangar(v))
- return CMD_ERROR;
+ if (v->type != VEH_Aircraft || !CheckOwnership(v->owner)) return CMD_ERROR;
+ if (!CheckStoppedInHangar(v)) return_cmd_error(STR_A01B_AIRCRAFT_MUST_BE_STOPPED);
SET_EXPENSES_TYPE(EXPENSES_NEW_VEHICLES);