mirror of https://github.com/OpenTTD/OpenTTD
(svn r14401) -Fix (r11724): Don't check articulated parts or rear multihead parts for callback 1D when moving a chain of wagons.
parent
e4242c8735
commit
37931fb2c6
|
@ -1165,6 +1165,8 @@ CommandCost CmdMoveRailVehicle(TileIndex tile, uint32 flags, uint32 p1, uint32 p
|
|||
Vehicle *src_previous = src->Previous();
|
||||
|
||||
while (next_to_attach != NULL) {
|
||||
/* Don't check callback for articulated or rear dual headed parts */
|
||||
if (!IsArticulatedPart(next_to_attach) && !IsRearDualheaded(next_to_attach)) {
|
||||
/* Back up and clear the first_engine data to avoid using wagon override group */
|
||||
EngineID first_engine = next_to_attach->u.rail.first_engine;
|
||||
next_to_attach->u.rail.first_engine = INVALID_ENGINE;
|
||||
|
@ -1197,6 +1199,7 @@ CommandCost CmdMoveRailVehicle(TileIndex tile, uint32 flags, uint32 p1, uint32 p
|
|||
return_cmd_error(error);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Only check further wagons if told to move the chain */
|
||||
if (!HasBit(p2, 0)) break;
|
||||
|
|
Loading…
Reference in New Issue