Mercurial > hg > openttd
changeset 8369:cd8726a0f767 draft
(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
author | bjarni <bjarni@openttd.org> |
---|---|
date | Mon, 21 Jan 2008 10:31:27 +0000 |
parents | b42c4785f6e8 |
children | bf2daa4819d0 |
files | src/aircraft_cmd.cpp |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/aircraft_cmd.cpp +++ b/src/aircraft_cmd.cpp @@ -1565,7 +1565,7 @@ /* 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; }