mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-16 00:12:51 +00:00
(svn r5664) -Fix: [SF 1518090 ] moving train engines in depot - crash (svn r5463)
this was present long before 5463 Darkvater deserves some of the credit for this fix since he discovered where the first pointer got set incorrectly
This commit is contained in:
parent
08bcbf5d04
commit
1ee788c0fb
@ -1156,6 +1156,8 @@ int32 CmdMoveRailVehicle(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
|
|||||||
src_head = src_head->next;
|
src_head = src_head->next;
|
||||||
}
|
}
|
||||||
AddWagonToConsist(src->u.rail.other_multiheaded_part, src);
|
AddWagonToConsist(src->u.rail.other_multiheaded_part, src);
|
||||||
|
// previous line set the front engine to the old front. We need to clear that
|
||||||
|
src->u.rail.other_multiheaded_part->first = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (HASBIT(p2, 0) && src_head != NULL && src_head != src) {
|
if (HASBIT(p2, 0) && src_head != NULL && src_head != src) {
|
||||||
|
Loading…
Reference in New Issue
Block a user