mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-04 06:00:15 +00:00
(svn r24950) -Fix (r24136): Also set replace when old flag when replacing an autoreplace
This commit is contained in:
parent
df3a9027d2
commit
68420aa92e
@ -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();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user