mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-16 00:12:51 +00:00
(svn r10022) -Fix (r10007): Set the type of multiheaded trains before the subtype.
This commit is contained in:
parent
19d7d1c9c5
commit
19250f91b0
@ -626,6 +626,7 @@ static void AddRearEngineToMultiheadedTrain(Vehicle* v, Vehicle* u, bool buildin
|
|||||||
u->z_pos = v->z_pos;
|
u->z_pos = v->z_pos;
|
||||||
u->u.rail.track = TRACK_BIT_DEPOT;
|
u->u.rail.track = TRACK_BIT_DEPOT;
|
||||||
u->vehstatus = v->vehstatus & ~VS_STOPPED;
|
u->vehstatus = v->vehstatus & ~VS_STOPPED;
|
||||||
|
u = new (u) Train();
|
||||||
u->subtype = 0;
|
u->subtype = 0;
|
||||||
SetMultiheaded(u);
|
SetMultiheaded(u);
|
||||||
u->spritenum = v->spritenum + 1;
|
u->spritenum = v->spritenum + 1;
|
||||||
@ -638,7 +639,6 @@ static void AddRearEngineToMultiheadedTrain(Vehicle* v, Vehicle* u, bool buildin
|
|||||||
u->build_year = v->build_year;
|
u->build_year = v->build_year;
|
||||||
if (building) v->value >>= 1;
|
if (building) v->value >>= 1;
|
||||||
u->value = v->value;
|
u->value = v->value;
|
||||||
u = new (u) Train();
|
|
||||||
u->cur_image = 0xAC2;
|
u->cur_image = 0xAC2;
|
||||||
u->random_bits = VehicleRandomBits();
|
u->random_bits = VehicleRandomBits();
|
||||||
VehiclePositionChanged(u);
|
VehiclePositionChanged(u);
|
||||||
|
Loading…
Reference in New Issue
Block a user