Do not attach temporary wagons to free wagon chains when autoreplacing
See: https://github.com/OpenTTD/OpenTTD/issues/9264
This commit is contained in:
@@ -1929,7 +1929,7 @@ CommandCost CmdMoveRailVehicle(TileIndex tile, DoCommandFlag flags, uint32 p1, u
|
||||
/* if nothing is selected as destination, try and find a matching vehicle to drag to. */
|
||||
Train *dst;
|
||||
if (d == INVALID_VEHICLE) {
|
||||
dst = src->IsEngine() ? nullptr : FindGoodVehiclePos(src);
|
||||
dst = (src->IsEngine() || (flags & DC_AUTOREPLACE)) ? nullptr : FindGoodVehiclePos(src);
|
||||
} else {
|
||||
dst = Train::GetIfValid(d);
|
||||
if (dst == nullptr) return check_on_failure(CMD_ERROR);
|
||||
|
Reference in New Issue
Block a user