Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/object/RideObject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ void RideObject::ReadLegacy(IReadObjectContext * context, IStream * stream)
numPeepLoadingPositions = stream->ReadValue<uint16>();
}
_peepLoadingPositions[i] = stream->ReadArray<sint8>(numPeepLoadingPositions);
_legacyType.vehicles[i].peep_loading_positions_size = numPeepLoadingPositions;
}

GetImageTable()->Read(context, stream);
Expand Down
1 change: 1 addition & 0 deletions src/peep/peep.c
Original file line number Diff line number Diff line change
Expand Up @@ -2251,6 +2251,7 @@ static void peep_update_ride_sub_state_1(rct_peep* peep){
return;
}

assert(peep->current_seat < vehicle_type->peep_loading_positions_size);
sint8 load_position = vehicle_type->peep_loading_positions[peep->current_seat];

switch (vehicle->sprite_direction / 8){
Expand Down
3 changes: 0 additions & 3 deletions src/ride/ride.h
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,6 @@ typedef struct rct_ride_entry {
uint8 shop_item; // 0x1C0
uint8 shop_item_secondary; // 0x1C1
} rct_ride_entry;
#ifdef PLATFORM_32BIT
assert_struct_size(rct_ride_entry, 0x1c2);
#endif

/**
* Ride structure.
Expand Down
5 changes: 2 additions & 3 deletions src/ride/vehicle.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,9 @@ typedef struct rct_ride_entry_vehicle {
uint8 draw_order;
uint8 special_frames; // 0x60 , 0x7A
sint8* peep_loading_positions; // 0x61 , 0x7B
uint8 peep_loading_positions_size;
} rct_ride_entry_vehicle;
#ifdef PLATFORM_32BIT
assert_struct_size(rct_ride_entry_vehicle, 0x65);
#endif


typedef struct rct_vehicle {
uint8 sprite_identifier; // 0x00
Expand Down