diff options
author | bjarni <bjarni@openttd.org> | 2008-01-21 10:31:27 +0000 |
---|---|---|
committer | bjarni <bjarni@openttd.org> | 2008-01-21 10:31:27 +0000 |
commit | 6786802863572600f45d4da7ee41d4df0a23f33e (patch) | |
tree | 5f65ab25df717af78c62dc5cef9d7be767406f58 | |
parent | b967c9918e2eb6b6bc31ba10c9cb0e394273b218 (diff) | |
download | openttd-6786802863572600f45d4da7ee41d4df0a23f33e.tar.xz |
(svn r11935) -Fix (r11875)[FS#1672]: autosend aircraft to hangar for replacement check inverted the check for autorenew
Now it triggers when renew setting is on and only if it's on
Note: aircraft already enroute to hangars due to this bug will still go there. They will only head there once though
-rw-r--r-- | src/aircraft_cmd.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/aircraft_cmd.cpp b/src/aircraft_cmd.cpp index 2988791d1..1f5083e84 100644 --- a/src/aircraft_cmd.cpp +++ b/src/aircraft_cmd.cpp @@ -1565,7 +1565,7 @@ static inline bool CheckSendAircraftToHangarForReplacement(const Vehicle *v) /* There is no autoreplace assigned to this EngineID so we will set it to renew to the same type if needed */ new_engine = v->engine_type; - if(p->engine_renew && (v->age - v->max_age) < p->engine_renew_months * 30) { + if(!p->engine_renew || (v->age - v->max_age) < p->engine_renew_months * 30) { /* No need to replace the aircraft */ return false; } |