diff --git a/src/openrct2/Game.cpp b/src/openrct2/Game.cpp index 0e8d47d2e8..1bb91f057a 100644 --- a/src/openrct2/Game.cpp +++ b/src/openrct2/Game.cpp @@ -449,9 +449,9 @@ void game_fix_save_vars() // Fix possibly invalid field values FOR_ALL_GUESTS (spriteIndex, peep) { - if (peep->current_ride_station >= MAX_STATIONS) + if (peep->CurrentRideStation >= MAX_STATIONS) { - const uint8_t srcStation = peep->current_ride_station; + const uint8_t srcStation = peep->CurrentRideStation; const uint8_t rideIdx = peep->current_ride; if (rideIdx == RIDE_ID_NULL) { @@ -478,7 +478,7 @@ void game_fix_save_vars() else { log_warning("Amending ride station to %u.", station); - peep->current_ride_station = station; + peep->CurrentRideStation = station; } } } diff --git a/src/openrct2/GameStateSnapshots.cpp b/src/openrct2/GameStateSnapshots.cpp index f9a621ff9c..fdea80c70d 100644 --- a/src/openrct2/GameStateSnapshots.cpp +++ b/src/openrct2/GameStateSnapshots.cpp @@ -251,7 +251,7 @@ struct GameStateSnapshots final : public IGameStateSnapshots COMPARE_FIELD(Peep, photo3_ride_ref); COMPARE_FIELD(Peep, photo4_ride_ref); COMPARE_FIELD(Peep, current_ride); - COMPARE_FIELD(Peep, current_ride_station); + COMPARE_FIELD(Peep, CurrentRideStation); COMPARE_FIELD(Peep, CurrentTrain); COMPARE_FIELD(Peep, TimeToSitdown); COMPARE_FIELD(Peep, SpecialSprite); diff --git a/src/openrct2/peep/Guest.cpp b/src/openrct2/peep/Guest.cpp index 08e7b55c93..1d52770647 100644 --- a/src/openrct2/peep/Guest.cpp +++ b/src/openrct2/peep/Guest.cpp @@ -2510,7 +2510,7 @@ static void peep_choose_seat_from_car(Peep* peep, Ride* ride, Vehicle* vehicle) */ void Guest::GoToRideEntrance(Ride* ride) { - TileCoordsXYZD tileLocation = ride_get_entrance_location(ride, current_ride_station); + TileCoordsXYZD tileLocation = ride_get_entrance_location(ride, CurrentRideStation); if (tileLocation.isNull()) { RemoveFromQueue(); @@ -2576,7 +2576,7 @@ bool Guest::FindVehicleToEnter(Ride* ride, std::vector& car_array) } else { - chosen_train = ride->stations[current_ride_station].TrainAtStation; + chosen_train = ride->stations[CurrentRideStation].TrainAtStation; } if (chosen_train == RideStation::NO_TRAIN || chosen_train >= MAX_VEHICLES_PER_RIDE) { @@ -3477,7 +3477,7 @@ void Guest::UpdateRideAtEntrance() int16_t actionZ = z; if (xy_distance < 16) { - auto entrance = ride_get_entrance_location(ride, current_ride_station).ToCoordsXYZ(); + auto entrance = ride_get_entrance_location(ride, CurrentRideStation).ToCoordsXYZ(); actionZ = entrance.z + 2; } MoveTo({ *loc, actionZ }); @@ -3568,9 +3568,9 @@ static void peep_update_ride_leave_entrance_maze(Guest* peep, Ride* ride, Coords static void peep_update_ride_leave_entrance_spiral_slide(Guest* peep, Ride* ride, CoordsXYZD& entrance_loc) { - entrance_loc = { ride->stations[peep->current_ride_station].GetStart(), entrance_loc.direction }; + entrance_loc = { ride->stations[peep->CurrentRideStation].GetStart(), entrance_loc.direction }; - TileElement* tile_element = ride_get_station_start_track_element(ride, peep->current_ride_station); + TileElement* tile_element = ride_get_station_start_track_element(ride, peep->CurrentRideStation); uint8_t direction_track = (tile_element == nullptr ? 0 : tile_element->GetDirection()); @@ -3615,13 +3615,13 @@ static uint8_t peep_get_waypointed_seat_location( static void peep_update_ride_leave_entrance_waypoints(Peep* peep, Ride* ride) { - TileCoordsXYZD entranceLocation = ride_get_entrance_location(ride, peep->current_ride_station); + TileCoordsXYZD entranceLocation = ride_get_entrance_location(ride, peep->CurrentRideStation); Guard::Assert(!entranceLocation.isNull()); uint8_t direction_entrance = entranceLocation.direction; - CoordsXY waypoint = ride->stations[peep->current_ride_station].Start.ToTileCentre(); + CoordsXY waypoint = ride->stations[peep->CurrentRideStation].Start.ToTileCentre(); - TileElement* tile_element = ride_get_station_start_track_element(ride, peep->current_ride_station); + TileElement* tile_element = ride_get_station_start_track_element(ride, peep->CurrentRideStation); uint8_t direction_track = (tile_element == nullptr ? 0 : tile_element->GetDirection()); @@ -3678,7 +3678,7 @@ void Guest::UpdateRideAdvanceThroughEntrance() sub_state = PEEP_RIDE_FREE_VEHICLE_CHECK; } - actionZ = ride->stations[current_ride_station].GetBaseZ(); + actionZ = ride->stations[CurrentRideStation].GetBaseZ(); distanceThreshold += 4; if (xy_distance < distanceThreshold) @@ -3693,7 +3693,7 @@ void Guest::UpdateRideAdvanceThroughEntrance() Guard::Assert(sub_state == PEEP_RIDE_LEAVE_ENTRANCE, "Peep substate should be LEAVE_ENTRANCE"); if (ride_type_has_flag(ride->type, RIDE_TYPE_FLAG_NO_VEHICLES)) { - auto entranceLocation = ride_get_entrance_location(ride, current_ride_station).ToCoordsXYZD(); + auto entranceLocation = ride_get_entrance_location(ride, CurrentRideStation).ToCoordsXYZD(); Guard::Assert(!entranceLocation.isNull()); if (ride->type == RIDE_TYPE_MAZE) @@ -3807,8 +3807,8 @@ static void peep_go_to_ride_exit(Peep* peep, Ride* ride, int16_t x, int16_t y, i peep->MoveTo({ x, y, z }); - Guard::Assert(peep->current_ride_station < MAX_STATIONS); - auto exit = ride_get_exit_location(ride, peep->current_ride_station); + Guard::Assert(peep->CurrentRideStation < MAX_STATIONS); + auto exit = ride_get_exit_location(ride, peep->CurrentRideStation); Guard::Assert(!exit.isNull()); x = exit.x; y = exit.y; @@ -3876,9 +3876,9 @@ void Guest::UpdateRideFreeVehicleEnterRide(Ride* ride) queueTime += 3; queueTime /= 2; - if (queueTime != ride->stations[current_ride_station].QueueTime) + if (queueTime != ride->stations[CurrentRideStation].QueueTime) { - ride->stations[current_ride_station].QueueTime = queueTime; + ride->stations[CurrentRideStation].QueueTime = queueTime; window_invalidate_by_number(WC_RIDE, current_ride); } @@ -3913,7 +3913,7 @@ void Guest::UpdateRideFreeVehicleEnterRide(Ride* ride) */ static void peep_update_ride_no_free_vehicle_rejoin_queue(Peep* peep, Ride* ride) { - TileCoordsXYZD entranceLocation = ride_get_entrance_location(ride, peep->current_ride_station); + TileCoordsXYZD entranceLocation = ride_get_entrance_location(ride, peep->CurrentRideStation); int32_t x = entranceLocation.x * 32; int32_t y = entranceLocation.y * 32; @@ -3927,7 +3927,7 @@ static void peep_update_ride_no_free_vehicle_rejoin_queue(Peep* peep, Ride* ride peep->SetState(PEEP_STATE_QUEUING_FRONT); peep->sub_state = PEEP_RIDE_AT_ENTRANCE; - ride->QueueInsertGuestAtFront(peep->current_ride_station, peep); + ride->QueueInsertGuestAtFront(peep->CurrentRideStation, peep); } /** @@ -4146,7 +4146,7 @@ void Guest::UpdateRideLeaveVehicle() } ride_station = bestStationIndex; } - current_ride_station = ride_station; + CurrentRideStation = ride_station; rct_ride_entry* rideEntry = get_ride_entry(vehicle->ride_subtype); if (rideEntry == nullptr) { @@ -4157,10 +4157,10 @@ void Guest::UpdateRideLeaveVehicle() if (!(vehicle_entry->flags & VEHICLE_ENTRY_FLAG_LOADING_WAYPOINTS)) { - assert(current_ride_station < MAX_STATIONS); - TileCoordsXYZD exitLocation = ride_get_exit_location(ride, current_ride_station); + assert(CurrentRideStation < MAX_STATIONS); + TileCoordsXYZD exitLocation = ride_get_exit_location(ride, CurrentRideStation); CoordsXYZD platformLocation; - platformLocation.z = ride->stations[current_ride_station].GetBaseZ(); + platformLocation.z = ride->stations[CurrentRideStation].GetBaseZ(); platformLocation.direction = direction_reverse(exitLocation.direction); @@ -4184,7 +4184,7 @@ void Guest::UpdateRideLeaveVehicle() } auto stationIndex = inner_map->AsTrack()->GetStationIndex(); - if (stationIndex == current_ride_station) + if (stationIndex == CurrentRideStation) break; } @@ -4254,20 +4254,20 @@ void Guest::UpdateRideLeaveVehicle() vehicle_entry->peep_loading_positions.size()); } - platformLocation.z = ride->stations[current_ride_station].GetBaseZ(); + platformLocation.z = ride->stations[CurrentRideStation].GetBaseZ(); peep_go_to_ride_exit( this, ride, platformLocation.x, platformLocation.y, platformLocation.z, platformLocation.direction); return; } - auto exitLocation = ride_get_exit_location(ride, current_ride_station).ToCoordsXYZD(); + auto exitLocation = ride_get_exit_location(ride, CurrentRideStation).ToCoordsXYZD(); Guard::Assert(!exitLocation.isNull()); - auto waypointLoc = CoordsXYZ{ ride->stations[current_ride_station].Start.ToTileCentre(), + auto waypointLoc = CoordsXYZ{ ride->stations[CurrentRideStation].Start.ToTileCentre(), exitLocation.z + RideData5[ride->type].z }; - TileElement* trackElement = ride_get_station_start_track_element(ride, current_ride_station); + TileElement* trackElement = ride_get_station_start_track_element(ride, CurrentRideStation); Direction station_direction = (trackElement == nullptr ? 0 : trackElement->GetDirection()); @@ -4312,10 +4312,10 @@ void Guest::UpdateRideLeaveVehicle() static void peep_update_ride_prepare_for_exit(Peep* peep) { auto ride = get_ride(peep->current_ride); - if (ride == nullptr || peep->current_ride_station >= std::size(ride->stations)) + if (ride == nullptr || peep->CurrentRideStation >= std::size(ride->stations)) return; - auto exit = ride_get_exit_location(ride, peep->current_ride_station); + auto exit = ride_get_exit_location(ride, peep->CurrentRideStation); int16_t x = exit.x; int16_t y = exit.y; uint8_t exit_direction = exit.direction; @@ -4383,7 +4383,7 @@ void Guest::UpdateRideInExit() { if (xy_distance >= 16) { - int16_t actionZ = ride->stations[current_ride_station].GetBaseZ(); + int16_t actionZ = ride->stations[CurrentRideStation].GetBaseZ(); actionZ += RideData5[ride->type].z; MoveTo({ *loc, actionZ }); @@ -4424,7 +4424,7 @@ void Guest::UpdateRideApproachVehicleWaypoints() // Motion simulators have steps this moves the peeps up the steps if (ride->type == RIDE_TYPE_MOTION_SIMULATOR) { - actionZ = ride->stations[current_ride_station].GetBaseZ() + 2; + actionZ = ride->stations[CurrentRideStation].GetBaseZ() + 2; if (waypoint == 2) { @@ -4458,7 +4458,7 @@ void Guest::UpdateRideApproachVehicleWaypoints() Vehicle* vehicle = GET_VEHICLE(ride->vehicles[CurrentTrain]); - CoordsXY targetLoc = ride->stations[current_ride_station].Start.ToTileCentre(); + CoordsXY targetLoc = ride->stations[CurrentRideStation].Start.ToTileCentre(); if (ride->type == RIDE_TYPE_ENTERPRISE) { @@ -4498,7 +4498,7 @@ void Guest::UpdateRideApproachExitWaypoints() int16_t actionZ; if (ride->type == RIDE_TYPE_MOTION_SIMULATOR) { - actionZ = ride->stations[current_ride_station].GetBaseZ() + 2; + actionZ = ride->stations[CurrentRideStation].GetBaseZ() + 2; if ((var_37 & 3) == 1) { @@ -4526,7 +4526,7 @@ void Guest::UpdateRideApproachExitWaypoints() var_37--; Vehicle* vehicle = GET_VEHICLE(ride->vehicles[CurrentTrain]); - CoordsXY targetLoc = ride->stations[current_ride_station].Start.ToTileCentre(); + CoordsXY targetLoc = ride->stations[CurrentRideStation].Start.ToTileCentre(); if (ride->type == RIDE_TYPE_ENTERPRISE) { @@ -4548,7 +4548,7 @@ void Guest::UpdateRideApproachExitWaypoints() var_37 |= 3; - auto targetLoc = ride_get_exit_location(ride, current_ride_station).ToCoordsXYZD().ToTileCentre(); + auto targetLoc = ride_get_exit_location(ride, CurrentRideStation).ToCoordsXYZD().ToTileCentre(); uint8_t exit_direction = direction_reverse(targetLoc.direction); int16_t x_shift = DirectionOffsets[exit_direction].x; @@ -4618,10 +4618,10 @@ void Guest::UpdateRideApproachSpiralSlide() if (lastRide) { - auto exit = ride_get_exit_location(ride, current_ride_station); + auto exit = ride_get_exit_location(ride, CurrentRideStation); waypoint = 1; var_37 = (exit.direction * 4) | (var_37 & 0x30) | waypoint; - CoordsXY targetLoc = ride->stations[current_ride_station].Start; + CoordsXY targetLoc = ride->stations[CurrentRideStation].Start; assert(ride->type == RIDE_TYPE_SPIRAL_SLIDE); targetLoc += SpiralSlideWalkingPath[var_37]; @@ -4636,7 +4636,7 @@ void Guest::UpdateRideApproachSpiralSlide() // Actually increment the real peep waypoint var_37++; - CoordsXY targetLoc = ride->stations[current_ride_station].Start; + CoordsXY targetLoc = ride->stations[CurrentRideStation].Start; assert(ride->type == RIDE_TYPE_SPIRAL_SLIDE); targetLoc += SpiralSlideWalkingPath[var_37]; @@ -4694,7 +4694,7 @@ void Guest::UpdateRideOnSpiralSlide() return; case 3: { - auto newLocation = ride->stations[current_ride_station].Start; + auto newLocation = ride->stations[CurrentRideStation].Start; uint8_t dir = (var_37 / 4) & 3; // Set the location that the peep walks to go on slide again @@ -4726,7 +4726,7 @@ void Guest::UpdateRideOnSpiralSlide() uint8_t waypoint = 2; var_37 = (var_37 * 4 & 0x30) + waypoint; - CoordsXY targetLoc = ride->stations[current_ride_station].Start; + CoordsXY targetLoc = ride->stations[CurrentRideStation].Start; assert(ride->type == RIDE_TYPE_SPIRAL_SLIDE); targetLoc += SpiralSlideWalkingPath[var_37]; @@ -4767,7 +4767,7 @@ void Guest::UpdateRideLeaveSpiralSlide() waypoint--; // Actually decrement the peep waypoint var_37--; - CoordsXY targetLoc = ride->stations[current_ride_station].Start; + CoordsXY targetLoc = ride->stations[CurrentRideStation].Start; assert(ride->type == RIDE_TYPE_SPIRAL_SLIDE); targetLoc += SpiralSlideWalkingPath[var_37]; @@ -4780,7 +4780,7 @@ void Guest::UpdateRideLeaveSpiralSlide() // Actually force the final waypoint var_37 |= 3; - auto targetLoc = ride_get_exit_location(ride, current_ride_station).ToCoordsXYZD().ToTileCentre(); + auto targetLoc = ride_get_exit_location(ride, CurrentRideStation).ToCoordsXYZD().ToTileCentre(); int16_t xShift = DirectionOffsets[direction_reverse(targetLoc.direction)].x; int16_t yShift = DirectionOffsets[direction_reverse(targetLoc.direction)].y; @@ -4981,7 +4981,7 @@ void Guest::UpdateRideLeaveExit() { if (ride != nullptr) { - MoveTo({ *loc, ride->stations[current_ride_station].GetBaseZ() }); + MoveTo({ *loc, ride->stations[CurrentRideStation].GetBaseZ() }); } return; } diff --git a/src/openrct2/peep/Peep.cpp b/src/openrct2/peep/Peep.cpp index 536d916564..30dd7c6674 100644 --- a/src/openrct2/peep/Peep.cpp +++ b/src/openrct2/peep/Peep.cpp @@ -2424,7 +2424,7 @@ static void peep_interact_with_entrance(Peep* peep, int16_t x, int16_t y, TileEl ride->stations[stationNum].QueueLength++; peep->current_ride = rideIndex; - peep->current_ride_station = stationNum; + peep->CurrentRideStation = stationNum; peep->DaysInQueue = 0; peep->SetState(PEEP_STATE_QUEUING); peep->sub_state = 11; @@ -2853,7 +2853,7 @@ static void peep_interact_with_path(Peep* peep, int16_t x, int16_t y, TileElemen peep_decrement_num_riders(peep); peep->current_ride = rideIndex; - peep->current_ride_station = stationNum; + peep->CurrentRideStation = stationNum; peep->state = PEEP_STATE_QUEUING; peep->DaysInQueue = 0; peep_window_state_update(peep); @@ -3405,7 +3405,7 @@ void Peep::RemoveFromQueue() if (ride == nullptr) return; - auto& station = ride->stations[current_ride_station]; + auto& station = ride->stations[CurrentRideStation]; // Make sure we don't underflow, building while paused might reset it to 0 where peeps have // not yet left the queue. if (station.QueueLength > 0) diff --git a/src/openrct2/peep/Peep.h b/src/openrct2/peep/Peep.h index 5c1e554023..c204b002a0 100644 --- a/src/openrct2/peep/Peep.h +++ b/src/openrct2/peep/Peep.h @@ -636,7 +636,7 @@ struct Peep : SpriteBase uint8_t photo3_ride_ref; uint8_t photo4_ride_ref; uint8_t current_ride; - StationIndex current_ride_station; + StationIndex CurrentRideStation; uint8_t CurrentTrain; union { diff --git a/src/openrct2/peep/Staff.cpp b/src/openrct2/peep/Staff.cpp index bea2d7e90b..454413021c 100644 --- a/src/openrct2/peep/Staff.cpp +++ b/src/openrct2/peep/Staff.cpp @@ -749,10 +749,10 @@ static uint8_t staff_mechanic_direction_surface(Peep* peep) if (ride != nullptr && (peep->state == PEEP_STATE_ANSWERING || peep->state == PEEP_STATE_HEADING_TO_INSPECTION) && (scenario_rand() & 1)) { - auto location = ride_get_exit_location(ride, peep->current_ride_station); + auto location = ride_get_exit_location(ride, peep->CurrentRideStation); if (location.isNull()) { - location = ride_get_entrance_location(ride, peep->current_ride_station); + location = ride_get_entrance_location(ride, peep->CurrentRideStation); } CoordsXY chosenTile = location.ToCoordsXY(); @@ -843,10 +843,10 @@ static uint8_t staff_mechanic_direction_path(Peep* peep, uint8_t validDirections { /* Find location of the exit for the target ride station * or if the ride has no exit, the entrance. */ - TileCoordsXYZD location = ride_get_exit_location(ride, peep->current_ride_station); + TileCoordsXYZD location = ride_get_exit_location(ride, peep->CurrentRideStation); if (location.isNull()) { - location = ride_get_entrance_location(ride, peep->current_ride_station); + location = ride_get_entrance_location(ride, peep->CurrentRideStation); // If no entrance is present either. This is an incorrect state. if (location.isNull()) @@ -1429,7 +1429,7 @@ void Staff::UpdateHeadingToInspect() return; } - if (ride_get_exit_location(ride, current_ride_station).isNull()) + if (ride_get_exit_location(ride, CurrentRideStation).isNull()) { ride->lifecycle_flags &= ~RIDE_LIFECYCLE_DUE_INSPECTION; SetState(PEEP_STATE_FALLING); @@ -1479,7 +1479,7 @@ void Staff::UpdateHeadingToInspect() uint8_t exit_index = rideEntranceExitElement->AsEntrance()->GetStationIndex(); - if (current_ride_station != exit_index) + if (CurrentRideStation != exit_index) return; if (pathingResult & PATHING_RIDE_ENTRANCE) @@ -1508,7 +1508,7 @@ void Staff::UpdateHeadingToInspect() int16_t delta_y = abs(y - destination_y); if (auto loc = UpdateAction()) { - int32_t newZ = ride->stations[current_ride_station].GetBaseZ(); + int32_t newZ = ride->stations[CurrentRideStation].GetBaseZ(); if (delta_y < 20) { @@ -1590,7 +1590,7 @@ void Staff::UpdateAnswering() uint8_t exit_index = rideEntranceExitElement->AsEntrance()->GetStationIndex(); - if (current_ride_station != exit_index) + if (CurrentRideStation != exit_index) return; if (pathingResult & PATHING_RIDE_ENTRANCE) @@ -1619,7 +1619,7 @@ void Staff::UpdateAnswering() int16_t delta_y = abs(y - destination_y); if (auto loc = UpdateAction()) { - int32_t newZ = ride->stations[current_ride_station].GetBaseZ(); + int32_t newZ = ride->stations[CurrentRideStation].GetBaseZ(); if (delta_y < 20) { @@ -2336,7 +2336,7 @@ bool Staff::UpdateFixingMoveToStationEnd(bool firstRun, Ride* ride) return true; } - auto stationPos = ride->stations[current_ride_station].GetStart(); + auto stationPos = ride->stations[CurrentRideStation].GetStart(); if (stationPos.isNull()) { return true; @@ -2424,7 +2424,7 @@ bool Staff::UpdateFixingMoveToStationStart(bool firstRun, Ride* ride) return true; } - auto stationPosition = ride->stations[current_ride_station].GetStart(); + auto stationPosition = ride->stations[CurrentRideStation].GetStart(); if (stationPosition.isNull()) { return true; @@ -2572,10 +2572,10 @@ bool Staff::UpdateFixingMoveToStationExit(bool firstRun, Ride* ride) { if (!firstRun) { - auto stationPosition = ride_get_exit_location(ride, current_ride_station).ToCoordsXY(); + auto stationPosition = ride_get_exit_location(ride, CurrentRideStation).ToCoordsXY(); if (stationPosition.isNull()) { - stationPosition = ride_get_entrance_location(ride, current_ride_station).ToCoordsXY(); + stationPosition = ride_get_entrance_location(ride, CurrentRideStation).ToCoordsXY(); if (stationPosition.isNull()) { @@ -2658,10 +2658,10 @@ bool Staff::UpdateFixingLeaveByEntranceExit(bool firstRun, Ride* ride) { if (!firstRun) { - auto exitPosition = ride_get_exit_location(ride, current_ride_station).ToCoordsXY(); + auto exitPosition = ride_get_exit_location(ride, CurrentRideStation).ToCoordsXY(); if (exitPosition.isNull()) { - exitPosition = ride_get_entrance_location(ride, current_ride_station).ToCoordsXY(); + exitPosition = ride_get_entrance_location(ride, CurrentRideStation).ToCoordsXY(); if (exitPosition.isNull()) { @@ -2684,7 +2684,7 @@ bool Staff::UpdateFixingLeaveByEntranceExit(bool firstRun, Ride* ride) int16_t xy_distance; if (auto loc = UpdateAction(xy_distance)) { - uint16_t stationHeight = ride->stations[current_ride_station].GetBaseZ(); + uint16_t stationHeight = ride->stations[CurrentRideStation].GetBaseZ(); if (xy_distance >= 16) { diff --git a/src/openrct2/rct1/S4Importer.cpp b/src/openrct2/rct1/S4Importer.cpp index 69b31f09c4..4334b463a0 100644 --- a/src/openrct2/rct1/S4Importer.cpp +++ b/src/openrct2/rct1/S4Importer.cpp @@ -1467,7 +1467,7 @@ private: dst->window_invalidate_flags = 0; dst->current_ride = src->current_ride; - dst->current_ride_station = src->current_ride_station; + dst->CurrentRideStation = src->current_ride_station; dst->CurrentTrain = src->current_train; dst->CurrentCar = src->current_car; dst->CurrentSeat = src->current_seat; diff --git a/src/openrct2/rct2/S6Exporter.cpp b/src/openrct2/rct2/S6Exporter.cpp index f3982eef7b..5b04046bab 100644 --- a/src/openrct2/rct2/S6Exporter.cpp +++ b/src/openrct2/rct2/S6Exporter.cpp @@ -1173,7 +1173,7 @@ void S6Exporter::ExportSpritePeep(RCT2SpritePeep* dst, const Peep* src) dst->photo3_ride_ref = src->photo3_ride_ref; dst->photo4_ride_ref = src->photo4_ride_ref; dst->current_ride = src->current_ride; - dst->current_ride_station = src->current_ride_station; + dst->current_ride_station = src->CurrentRideStation; dst->current_train = src->CurrentTrain; dst->time_to_sitdown = src->TimeToSitdown; dst->special_sprite = src->SpecialSprite; diff --git a/src/openrct2/rct2/S6Importer.cpp b/src/openrct2/rct2/S6Importer.cpp index 66247e0491..b4670a10e7 100644 --- a/src/openrct2/rct2/S6Importer.cpp +++ b/src/openrct2/rct2/S6Importer.cpp @@ -1438,7 +1438,7 @@ public: dst->photo3_ride_ref = src->photo3_ride_ref; dst->photo4_ride_ref = src->photo4_ride_ref; dst->current_ride = src->current_ride; - dst->current_ride_station = src->current_ride_station; + dst->CurrentRideStation = src->current_ride_station; dst->CurrentTrain = src->current_train; dst->TimeToSitdown = src->time_to_sitdown; dst->SpecialSprite = src->special_sprite; diff --git a/src/openrct2/ride/Ride.cpp b/src/openrct2/ride/Ride.cpp index c4d5423990..82a0c5555a 100644 --- a/src/openrct2/ride/Ride.cpp +++ b/src/openrct2/ride/Ride.cpp @@ -334,16 +334,16 @@ void Ride::QueueInsertGuestAtFront(StationIndex stationIndex, Peep* peep) assert(peep != nullptr); peep->GuestNextInQueue = SPRITE_INDEX_NULL; - Peep* queueHeadGuest = GetQueueHeadGuest(peep->current_ride_station); + Peep* queueHeadGuest = GetQueueHeadGuest(peep->CurrentRideStation); if (queueHeadGuest == nullptr) { - stations[peep->current_ride_station].LastPeepInQueue = peep->sprite_index; + stations[peep->CurrentRideStation].LastPeepInQueue = peep->sprite_index; } else { queueHeadGuest->GuestNextInQueue = peep->sprite_index; } - UpdateQueueLength(peep->current_ride_station); + UpdateQueueLength(peep->CurrentRideStation); } /** @@ -2640,7 +2640,7 @@ static void ride_call_mechanic(Ride* ride, Peep* mechanic, int32_t forInspection ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_MAINTENANCE; ride->mechanic = mechanic->sprite_index; mechanic->current_ride = ride->id; - mechanic->current_ride_station = ride->inspection_station; + mechanic->CurrentRideStation = ride->inspection_station; } /** diff --git a/test/tests/S6ImportExportTests.cpp b/test/tests/S6ImportExportTests.cpp index f1dd1c87c8..fae032e6a4 100644 --- a/test/tests/S6ImportExportTests.cpp +++ b/test/tests/S6ImportExportTests.cpp @@ -195,7 +195,7 @@ static void CompareSpriteDataPeep(const Peep& left, const Peep& right) COMPARE_FIELD(photo3_ride_ref); COMPARE_FIELD(photo4_ride_ref); COMPARE_FIELD(current_ride); - COMPARE_FIELD(current_ride_station); + COMPARE_FIELD(CurrentRideStation); COMPARE_FIELD(CurrentTrain); COMPARE_FIELD(TimeToSitdown); COMPARE_FIELD(SpecialSprite);