(svn r24950) -Fix (r24136): Also set replace when old flag when replacing an autoreplace

This commit is contained in:
peter1138 2013-01-31 10:21:04 +00:00
parent df3a9027d2
commit 68420aa92e

View File

@ -87,7 +87,10 @@ CommandCost AddEngineReplacement(EngineRenewList *erl, EngineID old_engine, Engi
/* Check if the old vehicle is already in the list */
EngineRenew *er = GetEngineReplacement(*erl, old_engine, group);
if (er != NULL) {
if (flags & DC_EXEC) er->to = new_engine;
if (flags & DC_EXEC) {
er->to = new_engine;
er->replace_when_old = replace_when_old;
}
return CommandCost();
}