1
0
Fork 0

(svn r14401) -Fix (r11724): Don't check articulated parts or rear multihead parts for callback 1D when moving a chain of wagons.

release/0.7
peter1138 2008-09-26 06:52:06 +00:00
parent e4242c8735
commit 37931fb2c6
1 changed files with 27 additions and 24 deletions

View File

@ -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;