1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-28 17:24:47 +01:00

Fix trains splitting up into multiple vehicles

This commit is contained in:
duncanspumpkin
2017-01-07 14:52:01 +00:00
committed by Ted John
parent dacfba9eda
commit e3e435c9f7

View File

@@ -831,11 +831,16 @@ private:
if (srcVehicle->x != (sint16)0x8000)
{
rct_vehicle * vehicle = (rct_vehicle *)create_sprite(SPRITE_IDENTIFIER_VEHICLE);
move_sprite_to_list((rct_sprite *)vehicle, SPRITE_LIST_VEHICLE * 2);
spriteIndexMap[i] = vehicle->sprite_index;
vehicles.push_back(vehicle);
ImportVehicle(vehicle, srcVehicle);
// If vehicle is the first car on a train add to train list
if (!vehicle->is_child)
{
move_sprite_to_list((rct_sprite *)vehicle, SPRITE_LIST_TRAIN * 2);
}
}
}
}