mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-02-12 01:24:54 +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 */
|
/* Check if the old vehicle is already in the list */
|
||||||
EngineRenew *er = GetEngineReplacement(*erl, old_engine, group);
|
EngineRenew *er = GetEngineReplacement(*erl, old_engine, group);
|
||||||
if (er != NULL) {
|
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();
|
return CommandCost();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user