mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-25 07:44:38 +01:00
Ensure move_sprite_to_list only used in sprite.cpp
After an entity is created it should never need to call this function. This will be important in later changes when the lists are changed to vectors
This commit is contained in:
@@ -23,13 +23,13 @@
|
||||
Vehicle* cable_lift_segment_create(
|
||||
Ride& ride, int32_t x, int32_t y, int32_t z, int32_t direction, uint16_t var_44, int32_t remaining_distance, bool head)
|
||||
{
|
||||
Vehicle* current = &(create_sprite(SPRITE_IDENTIFIER_VEHICLE)->vehicle);
|
||||
Vehicle* current = &(
|
||||
create_sprite(SPRITE_IDENTIFIER_VEHICLE, head ? SPRITE_LIST_TRAIN_HEAD : SPRITE_LIST_VEHICLE)->vehicle);
|
||||
current->sprite_identifier = SPRITE_IDENTIFIER_VEHICLE;
|
||||
current->ride = ride.id;
|
||||
current->ride_subtype = RIDE_ENTRY_INDEX_NULL;
|
||||
if (head)
|
||||
{
|
||||
move_sprite_to_list(current, SPRITE_LIST_TRAIN_HEAD);
|
||||
ride.cable_lift = current->sprite_index;
|
||||
}
|
||||
current->type = head ? VEHICLE_TYPE_HEAD : VEHICLE_TYPE_TAIL;
|
||||
|
||||
Reference in New Issue
Block a user