diff --git a/src/openrct2/GameStateSnapshots.cpp b/src/openrct2/GameStateSnapshots.cpp index 1a03b2d39e..82e7c868bd 100644 --- a/src/openrct2/GameStateSnapshots.cpp +++ b/src/openrct2/GameStateSnapshots.cpp @@ -392,8 +392,8 @@ struct GameStateSnapshots final : public IGameStateSnapshots void CompareSpriteDataVehicle(const Vehicle& spriteBase, const Vehicle& spriteCmp, GameStateSpriteChange& changeData) const { COMPARE_FIELD(Vehicle, SubType); - COMPARE_FIELD(Vehicle, Pitch); - COMPARE_FIELD(Vehicle, bank_rotation); + COMPARE_FIELD(Vehicle, pitch); + COMPARE_FIELD(Vehicle, roll); COMPARE_FIELD(Vehicle, remaining_distance); COMPARE_FIELD(Vehicle, velocity); COMPARE_FIELD(Vehicle, acceleration); diff --git a/src/openrct2/entity/Guest.cpp b/src/openrct2/entity/Guest.cpp index 2be6c8a39d..7bdd6368c9 100644 --- a/src/openrct2/entity/Guest.cpp +++ b/src/openrct2/entity/Guest.cpp @@ -2512,7 +2512,7 @@ static void PeepChooseSeatFromCar(Guest* guest, const Ride& ride, Vehicle* vehic if (ride.mode == RideMode::forwardRotation || ride.mode == RideMode::backwardRotation) { - chosen_seat = (((~vehicle->Pitch + 1) >> 3) & 0xF) * 2; + chosen_seat = (((~vehicle->pitch + 1) >> 3) & 0xF) * 2; if (vehicle->next_free_seat & 1) { chosen_seat++; @@ -2627,7 +2627,7 @@ static bool FindVehicleToEnter( if (ride.mode == RideMode::forwardRotation || ride.mode == RideMode::backwardRotation) { - uint8_t position = (((~vehicle->Pitch + 1) >> 3) & 0xF) * 2; + uint8_t position = (((~vehicle->pitch + 1) >> 3) & 0xF) * 2; if (!vehicle->peep[position].IsNull()) continue; } diff --git a/src/openrct2/paint/track/gentle/FerrisWheel.cpp b/src/openrct2/paint/track/gentle/FerrisWheel.cpp index 70e73dd6d8..45a299a1c0 100644 --- a/src/openrct2/paint/track/gentle/FerrisWheel.cpp +++ b/src/openrct2/paint/track/gentle/FerrisWheel.cpp @@ -56,7 +56,7 @@ static void PaintFerrisWheelRiders( if (peep == nullptr || peep->State != PeepState::OnRide) continue; - auto frameNum = (vehicle.Pitch + i * 4) % 128; + auto frameNum = (vehicle.pitch + i * 4) % 128; auto imageIndex = rideEntry.Cars[0].base_image_id + 32 + direction * 128 + frameNum; auto imageId = ImageId(imageIndex, vehicle.peep_tshirt_colours[i], vehicle.peep_tshirt_colours[i + 1]); PaintAddImageAsChild(session, imageId, offset, bb); @@ -88,7 +88,7 @@ static void PaintFerrisWheelStructure( wheelImageTemplate = stationColour; } - auto imageOffset = vehicle != nullptr ? vehicle->Pitch % 8 : 0; + auto imageOffset = vehicle != nullptr ? vehicle->pitch % 8 : 0; auto leftSupportImageId = supportsImageTemplate.WithIndex(22150 + (direction & 1) * 2); auto wheelImageId = wheelImageTemplate.WithIndex(rideEntry->Cars[0].base_image_id + direction * 8 + imageOffset); auto rightSupportImageId = leftSupportImageId.WithIndexOffset(1); diff --git a/src/openrct2/paint/track/gentle/HauntedHouse.cpp b/src/openrct2/paint/track/gentle/HauntedHouse.cpp index 80098440f4..f26252cc1e 100644 --- a/src/openrct2/paint/track/gentle/HauntedHouse.cpp +++ b/src/openrct2/paint/track/gentle/HauntedHouse.cpp @@ -44,7 +44,7 @@ static void PaintHauntedHouseStructure( { session.InteractionType = ViewportInteractionItem::Entity; session.CurrentlyDrawnEntity = vehicle; - frameNum = vehicle->Pitch; + frameNum = vehicle->pitch; } const auto& boundBox = kHauntedHouseData[part]; diff --git a/src/openrct2/paint/track/gentle/MerryGoRound.cpp b/src/openrct2/paint/track/gentle/MerryGoRound.cpp index fbd6e31916..4086082c7a 100644 --- a/src/openrct2/paint/track/gentle/MerryGoRound.cpp +++ b/src/openrct2/paint/track/gentle/MerryGoRound.cpp @@ -82,7 +82,7 @@ static void PaintCarousel( if (vehicle != nullptr) { auto rotation = ((vehicle->Orientation >> 3) + session.CurrentRotation) << 5; - rotationOffset = (vehicle->Pitch + rotation) % 128; + rotationOffset = (vehicle->pitch + rotation) % 128; } CoordsXYZ offset(xOffset, yOffset, height); diff --git a/src/openrct2/paint/track/gentle/SpaceRings.cpp b/src/openrct2/paint/track/gentle/SpaceRings.cpp index ae8f42feb0..006c400647 100644 --- a/src/openrct2/paint/track/gentle/SpaceRings.cpp +++ b/src/openrct2/paint/track/gentle/SpaceRings.cpp @@ -58,7 +58,7 @@ static void PaintSpaceRingsStructure( { session.InteractionType = ViewportInteractionItem::Entity; session.CurrentlyDrawnEntity = vehicle; - frameNum += static_cast(vehicle->Pitch) * 4; + frameNum += static_cast(vehicle->pitch) * 4; } if (ride.vehicleColourSettings != VehicleColourSettings::perTrain) diff --git a/src/openrct2/paint/track/thrill/Enterprise.cpp b/src/openrct2/paint/track/thrill/Enterprise.cpp index a89477c5e1..f15af05745 100644 --- a/src/openrct2/paint/track/thrill/Enterprise.cpp +++ b/src/openrct2/paint/track/thrill/Enterprise.cpp @@ -72,7 +72,7 @@ static void PaintEnterpriseStructure( uint32_t imageOffset = trackElement.GetDirectionWithOffset(session.CurrentRotation); if (vehicle != nullptr) { - imageOffset = (vehicle->Pitch << 2) + (((vehicle->Orientation >> 3) + session.CurrentRotation) % 4); + imageOffset = (vehicle->pitch << 2) + (((vehicle->Orientation >> 3) + session.CurrentRotation) % 4); } auto imageTemplate = ImageId(0, ride.vehicleColours[0].Body, ride.vehicleColours[0].Trim); diff --git a/src/openrct2/paint/track/thrill/MagicCarpet.cpp b/src/openrct2/paint/track/thrill/MagicCarpet.cpp index 3275b299e8..b77f87c871 100644 --- a/src/openrct2/paint/track/thrill/MagicCarpet.cpp +++ b/src/openrct2/paint/track/thrill/MagicCarpet.cpp @@ -192,7 +192,7 @@ static void PaintMagicCarpetStructure( auto* vehicle = GetFirstVehicle(ride); if (vehicle != nullptr) { - swing = vehicle->Pitch; + swing = vehicle->pitch; session.InteractionType = ViewportInteractionItem::Entity; session.CurrentlyDrawnEntity = vehicle; } diff --git a/src/openrct2/paint/track/thrill/MotionSimulator.cpp b/src/openrct2/paint/track/thrill/MotionSimulator.cpp index 5c56abc527..21b99bbaa5 100644 --- a/src/openrct2/paint/track/thrill/MotionSimulator.cpp +++ b/src/openrct2/paint/track/thrill/MotionSimulator.cpp @@ -65,7 +65,7 @@ static void PaintMotionSimulatorVehicle( } else { - imageIndex += vehicle->Pitch * 4; + imageIndex += vehicle->pitch * 4; } } diff --git a/src/openrct2/paint/track/thrill/SwingingInverterShip.cpp b/src/openrct2/paint/track/thrill/SwingingInverterShip.cpp index 0334135a1c..b4d5bc55f7 100644 --- a/src/openrct2/paint/track/thrill/SwingingInverterShip.cpp +++ b/src/openrct2/paint/track/thrill/SwingingInverterShip.cpp @@ -88,7 +88,7 @@ static void PaintSwingingInverterShipStructure( ImageIndex vehicleImageIndex = rideEntry->Cars[0].base_image_id + kSwingingInverterShipBaseSpriteOffset[direction]; if (vehicle != nullptr) { - int32_t rotation = static_cast(vehicle->Pitch); + int32_t rotation = static_cast(vehicle->pitch); if (rotation != 0) { vehicleImageIndex = rideEntry->Cars[0].base_image_id + kSwingingInverterShipAnimatingBaseSpriteOffset[direction]; diff --git a/src/openrct2/paint/track/thrill/SwingingShip.cpp b/src/openrct2/paint/track/thrill/SwingingShip.cpp index 2d4e0b3f71..c6761a266f 100644 --- a/src/openrct2/paint/track/thrill/SwingingShip.cpp +++ b/src/openrct2/paint/track/thrill/SwingingShip.cpp @@ -110,7 +110,7 @@ static void PaintSwingingShipStructure( auto baseImageId = rideEntry->Cars[0].base_image_id + kSwingingShipBaseSpriteOffset[direction]; if (vehicle != nullptr) { - int32_t rotation = static_cast(vehicle->Pitch); + int32_t rotation = static_cast(vehicle->pitch); if (rotation != 0) { if (direction & 2) diff --git a/src/openrct2/paint/track/thrill/TopSpin.cpp b/src/openrct2/paint/track/thrill/TopSpin.cpp index 0061b4aaeb..e150de9137 100644 --- a/src/openrct2/paint/track/thrill/TopSpin.cpp +++ b/src/openrct2/paint/track/thrill/TopSpin.cpp @@ -135,8 +135,8 @@ static void PaintTopSpinVehicle( session.InteractionType = ViewportInteractionItem::Entity; session.CurrentlyDrawnEntity = vehicle; - armRotation = vehicle->Pitch; - seatRotation = vehicle->bank_rotation; + armRotation = vehicle->pitch; + seatRotation = vehicle->roll; } int32_t armImageOffset = armRotation; diff --git a/src/openrct2/paint/track/thrill/Twist.cpp b/src/openrct2/paint/track/thrill/Twist.cpp index 96b0b68425..b0c25e97a6 100644 --- a/src/openrct2/paint/track/thrill/Twist.cpp +++ b/src/openrct2/paint/track/thrill/Twist.cpp @@ -50,7 +50,7 @@ static void PaintTwistStructure( if (vehicle != nullptr) { frameNum += (vehicle->Orientation >> 3) << 4; - frameNum += vehicle->Pitch; + frameNum += vehicle->pitch; frameNum = frameNum % 216; } diff --git a/src/openrct2/paint/vehicle/Vehicle.RiverRapids.cpp b/src/openrct2/paint/vehicle/Vehicle.RiverRapids.cpp index 489c8dd1b3..972f2a9ead 100644 --- a/src/openrct2/paint/vehicle/Vehicle.RiverRapids.cpp +++ b/src/openrct2/paint/vehicle/Vehicle.RiverRapids.cpp @@ -39,15 +39,15 @@ namespace OpenRCT2 uint32_t rotation = session.CurrentRotation; int32_t ecx = ((vehicle->spin_sprite / 8) + (rotation * 8)) & 31; int32_t j = 0; - if (vehicle->Pitch == 0) + if (vehicle->pitch == 0) { baseImage_id = ecx & 7; } else { - if (vehicle->Pitch == 1 || vehicle->Pitch == 5) + if (vehicle->pitch == 1 || vehicle->pitch == 5) { - if (vehicle->Pitch == 5) + if (vehicle->pitch == 5) { baseImage_id = imageDirection ^ 16; } @@ -56,9 +56,9 @@ namespace OpenRCT2 baseImage_id += (ecx & 7); baseImage_id += 8; } - else if (vehicle->Pitch == 2 || vehicle->Pitch == 6) + else if (vehicle->pitch == 2 || vehicle->pitch == 6) { - if (vehicle->Pitch == 6) + if (vehicle->pitch == 6) { baseImage_id = imageDirection ^ 16; } diff --git a/src/openrct2/paint/vehicle/Vehicle.VirginaReel.cpp b/src/openrct2/paint/vehicle/Vehicle.VirginaReel.cpp index c8a32472d4..31d12e250f 100644 --- a/src/openrct2/paint/vehicle/Vehicle.VirginaReel.cpp +++ b/src/openrct2/paint/vehicle/Vehicle.VirginaReel.cpp @@ -36,7 +36,7 @@ namespace OpenRCT2 const uint8_t rotation = session.CurrentRotation; int32_t ecx = ((vehicle->spin_sprite / 8) + (rotation * 8)) & 31; int32_t baseImage_id = [&] { - switch (vehicle->Pitch) + switch (vehicle->pitch) { case 1: return (imageDirection & 24) + 8; diff --git a/src/openrct2/paint/vehicle/VehiclePaint.cpp b/src/openrct2/paint/vehicle/VehiclePaint.cpp index 754c4a2687..711b0d1255 100644 --- a/src/openrct2/paint/vehicle/VehiclePaint.cpp +++ b/src/openrct2/paint/vehicle/VehiclePaint.cpp @@ -1071,7 +1071,7 @@ static void VehicleSpritePaintRestraints( // Returns the opposite of the bank angle for reversed cars, normal bank angle otherwise static uint8_t GetPaintBankRotation(const Vehicle* vehicle) { - return (vehicle->HasFlag(VehicleFlags::CarIsReversed)) ? BankInvertTable[vehicle->bank_rotation] : vehicle->bank_rotation; + return (vehicle->HasFlag(VehicleFlags::CarIsReversed)) ? BankInvertTable[vehicle->roll] : vehicle->roll; } #pragma endregion @@ -4463,7 +4463,7 @@ static void vehicle_visual_splash2_effect(PaintSession& session, const int32_t z { return; } - if (vehicle->Pitch != 0) + if (vehicle->pitch != 0) { return; } @@ -4486,7 +4486,7 @@ static void vehicle_visual_splash3_effect(PaintSession& session, const int32_t z { return; } - if (vehicle->Pitch != 0) + if (vehicle->pitch != 0) { return; } @@ -4518,7 +4518,7 @@ static void vehicle_visual_splash4_effect(PaintSession& session, const int32_t z { return; } - if (vehicle->Pitch != 0) + if (vehicle->pitch != 0) { return; } @@ -4546,7 +4546,7 @@ static void vehicle_visual_splash5_effect(PaintSession& session, const int32_t z { return; } - if (vehicle->Pitch != 0) + if (vehicle->pitch != 0) { return; } @@ -4590,18 +4590,18 @@ void VehicleVisualSplashEffect(PaintSession& session, const int32_t z, const Veh void VehicleVisualDefault( PaintSession& session, int32_t imageDirection, const int32_t z, const Vehicle* vehicle, const CarEntry* carEntry) { - if (vehicle->Pitch < std::size(PaintFunctionsByPitch)) + if (vehicle->pitch < std::size(PaintFunctionsByPitch)) { if (vehicle->HasFlag(VehicleFlags::CarIsReversed)) { - auto imagePitch = PitchInvertTable[vehicle->Pitch]; + auto imagePitch = PitchInvertTable[vehicle->pitch]; auto imageYaw = (imageDirection + (OpenRCT2::Entity::Yaw::kBaseRotation / 2)) & (OpenRCT2::Entity::Yaw::kBaseRotation - 1); PaintFunctionsByPitch[imagePitch](session, vehicle, imageYaw, z, carEntry, kBoundBoxIndexUndefined); } else { - PaintFunctionsByPitch[vehicle->Pitch](session, vehicle, imageDirection, z, carEntry, kBoundBoxIndexUndefined); + PaintFunctionsByPitch[vehicle->pitch](session, vehicle, imageDirection, z, carEntry, kBoundBoxIndexUndefined); } } } diff --git a/src/openrct2/park/ParkFile.cpp b/src/openrct2/park/ParkFile.cpp index acdaff749d..c99de1def7 100644 --- a/src/openrct2/park/ParkFile.cpp +++ b/src/openrct2/park/ParkFile.cpp @@ -2204,8 +2204,8 @@ namespace OpenRCT2 { ReadWriteEntityCommon(cs, entity); cs.readWrite(entity.SubType); - cs.readWrite(entity.Pitch); - cs.readWrite(entity.bank_rotation); + cs.readWrite(entity.pitch); + cs.readWrite(entity.roll); cs.readWrite(entity.remaining_distance); cs.readWrite(entity.velocity); cs.readWrite(entity.acceleration); diff --git a/src/openrct2/rct1/S4Importer.cpp b/src/openrct2/rct1/S4Importer.cpp index f0ea1cb1ae..71d201ab49 100644 --- a/src/openrct2/rct1/S4Importer.cpp +++ b/src/openrct2/rct1/S4Importer.cpp @@ -2834,8 +2834,8 @@ namespace OpenRCT2::RCT1 dst->NumLaps = src->NumLaps; dst->var_D3 = src->VarD3; dst->scream_sound_id = OpenRCT2::Audio::SoundId::Null; - dst->Pitch = src->Pitch; - dst->bank_rotation = src->BankRotation; + dst->pitch = src->Pitch; + dst->roll = src->BankRotation; // Seat rotation was not in RCT1 dst->target_seat_rotation = DEFAULT_SEAT_ROTATION; diff --git a/src/openrct2/rct2/S6Importer.cpp b/src/openrct2/rct2/S6Importer.cpp index b510718b2d..79472ad510 100644 --- a/src/openrct2/rct2/S6Importer.cpp +++ b/src/openrct2/rct2/S6Importer.cpp @@ -1952,8 +1952,8 @@ namespace OpenRCT2::RCT2 ImportEntityCommonProperties(dst, src); dst->SubType = ::Vehicle::Type(src->Type); - dst->Pitch = src->Pitch; - dst->bank_rotation = src->BankRotation; + dst->pitch = src->Pitch; + dst->roll = src->BankRotation; dst->remaining_distance = src->RemainingDistance; dst->velocity = src->Velocity; dst->acceleration = src->Acceleration; diff --git a/src/openrct2/ride/CableLift.cpp b/src/openrct2/ride/CableLift.cpp index 9813326bab..f46413c2ec 100644 --- a/src/openrct2/ride/CableLift.cpp +++ b/src/openrct2/ride/CableLift.cpp @@ -59,8 +59,8 @@ Vehicle* CableLiftSegmentCreate( current->animation_frame = 0; current->animationState = 0; current->scream_sound_id = OpenRCT2::Audio::SoundId::Null; - current->Pitch = 0; - current->bank_rotation = 0; + current->pitch = 0; + current->roll = 0; for (auto& peep : current->peep) { peep = EntityId::GetNull(); @@ -289,12 +289,12 @@ bool Vehicle::CableLiftUpdateTrackMotionForwards() _vehicleCurPosition.z = nextVehiclePosition.z; Orientation = moveInfo->direction; - bank_rotation = moveInfo->bank_rotation; - Pitch = moveInfo->Pitch; + roll = moveInfo->roll; + pitch = moveInfo->pitch; if (remaining_distance >= 13962) { - acceleration += AccelerationFromPitch[Pitch]; + acceleration += AccelerationFromPitch[pitch]; } } return true; @@ -358,12 +358,12 @@ bool Vehicle::CableLiftUpdateTrackMotionBackwards() _vehicleCurPosition.z = unk.z; Orientation = moveInfo->direction; - bank_rotation = moveInfo->bank_rotation; - Pitch = moveInfo->Pitch; + roll = moveInfo->roll; + pitch = moveInfo->pitch; if (remaining_distance < 0) { - acceleration += AccelerationFromPitch[Pitch]; + acceleration += AccelerationFromPitch[pitch]; } } return true; @@ -394,7 +394,7 @@ int32_t Vehicle::CableLiftUpdateTrackMotion() for (Vehicle* vehicle = frontVehicle; vehicle != nullptr;) { - vehicle->acceleration = AccelerationFromPitch[vehicle->Pitch]; + vehicle->acceleration = AccelerationFromPitch[vehicle->pitch]; _vehicleUnkF64E10 = 1; vehicle->remaining_distance += _vehicleVelocityF64E0C; @@ -415,7 +415,7 @@ int32_t Vehicle::CableLiftUpdateTrackMotion() _vehicleMotionTrackFlags |= VEHICLE_UPDATE_MOTION_TRACK_FLAG_5; _vehicleVelocityF64E0C -= vehicle->remaining_distance - 13962; vehicle->remaining_distance = 13962; - vehicle->acceleration += AccelerationFromPitch[vehicle->Pitch]; + vehicle->acceleration += AccelerationFromPitch[vehicle->pitch]; _vehicleUnkF64E10++; continue; } @@ -428,7 +428,7 @@ int32_t Vehicle::CableLiftUpdateTrackMotion() _vehicleMotionTrackFlags |= VEHICLE_UPDATE_MOTION_TRACK_FLAG_5; _vehicleVelocityF64E0C -= vehicle->remaining_distance + 1; vehicle->remaining_distance = -1; - vehicle->acceleration += AccelerationFromPitch[vehicle->Pitch]; + vehicle->acceleration += AccelerationFromPitch[vehicle->pitch]; _vehicleUnkF64E10++; } vehicle->MoveTo(_vehicleCurPosition); diff --git a/src/openrct2/ride/Ride.cpp b/src/openrct2/ride/Ride.cpp index 1ba62fa0a6..9eac3f7bc4 100644 --- a/src/openrct2/ride/Ride.cpp +++ b/src/openrct2/ride/Ride.cpp @@ -3266,8 +3266,8 @@ static Vehicle* VehicleCreateCar( vehicle->animation_frame = 0; vehicle->animationState = 0; vehicle->scream_sound_id = OpenRCT2::Audio::SoundId::Null; - vehicle->Pitch = 0; - vehicle->bank_rotation = 0; + vehicle->pitch = 0; + vehicle->roll = 0; vehicle->target_seat_rotation = 4; vehicle->seat_rotation = 4; for (size_t i = 0; i < std::size(vehicle->peep); i++) diff --git a/src/openrct2/ride/Vehicle.cpp b/src/openrct2/ride/Vehicle.cpp index 0075fda41b..3121d9e4d3 100644 --- a/src/openrct2/ride/Vehicle.cpp +++ b/src/openrct2/ride/Vehicle.cpp @@ -599,8 +599,8 @@ void Vehicle::UpdateTrackChange() _vehicleCurPosition = TrackLocation + CoordsXYZ{ moveInfo->x, moveInfo->y, moveInfo->z + GetRideTypeDescriptor((*curRide).type).Heights.VehicleZOffset }; Orientation = moveInfo->direction; - bank_rotation = moveInfo->bank_rotation; - Pitch = moveInfo->Pitch; + roll = moveInfo->roll; + pitch = moveInfo->pitch; MoveTo(_vehicleCurPosition); } @@ -1176,12 +1176,12 @@ void Vehicle::UpdateMeasurements() curRide->increaseNumShelteredSections(); - if (Pitch != 0) + if (pitch != 0) { curRide->numShelteredSections |= ShelteredSectionsBits::kRotatingWhileSheltered; } - if (bank_rotation != 0) + if (roll != 0) { curRide->numShelteredSections |= ShelteredSectionsBits::kBankingWhileSheltered; } @@ -1274,7 +1274,7 @@ void Vehicle::Update() auto carEntry = &rideEntry->Cars[vehicle_type]; if ((carEntry->flags & CAR_ENTRY_FLAG_POWERED) && curRide->breakdownReasonPending == BREAKDOWN_SAFETY_CUT_OUT) { - if (!(carEntry->flags & CAR_ENTRY_FLAG_WATER_RIDE) || (Pitch == 2 && velocity <= 2.0_mph)) + if (!(carEntry->flags & CAR_ENTRY_FLAG_WATER_RIDE) || (pitch == 2 && velocity <= 2.0_mph)) { SetFlag(VehicleFlags::StoppedOnLift); } @@ -1501,7 +1501,7 @@ void Vehicle::TrainReadyToDepart(uint8_t num_peeps_on_train, uint8_t num_used_se if (curRide->mode == RideMode::forwardRotation || curRide->mode == RideMode::backwardRotation) { - uint8_t seat = ((-Pitch) / 8) & 0xF; + uint8_t seat = ((-pitch) / 8) & 0xF; if (!peep[seat].IsNull()) { curRide->getStation(current_station).TrainAtStation = RideStation::kNoTrain; @@ -1791,7 +1791,7 @@ void Vehicle::UpdateWaitingToDepart() { if (curRide->mode == RideMode::forwardRotation || curRide->mode == RideMode::backwardRotation) { - uint8_t seat = ((-Pitch) >> 3) & 0xF; + uint8_t seat = ((-pitch) >> 3) & 0xF; if (peep[seat * 2].IsNull()) { if (num_peeps == 0) @@ -1917,13 +1917,13 @@ void Vehicle::UpdateWaitingToDepart() } } current_time = -1; - Pitch = 0; - bank_rotation = 0; + pitch = 0; + roll = 0; UpdateTopSpinOperating(); break; case RideMode::forwardRotation: case RideMode::backwardRotation: - SetState(Vehicle::Status::FerrisWheelRotating, Pitch); + SetState(Vehicle::Status::FerrisWheelRotating, pitch); NumRotations = 0; ferris_wheel_var_0 = 8; ferris_wheel_var_1 = 8; @@ -1960,19 +1960,19 @@ void Vehicle::UpdateWaitingToDepart() break; case RideMode::spaceRings: SetState(Vehicle::Status::SpaceRingsOperating); - Pitch = 0; + pitch = 0; current_time = -1; UpdateSpaceRingsOperating(); break; case RideMode::hauntedHouse: SetState(Vehicle::Status::HauntedHouseOperating); - Pitch = 0; + pitch = 0; current_time = -1; UpdateHauntedHouseOperating(); break; case RideMode::crookedHouse: SetState(Vehicle::Status::CrookedHouseOperating); - Pitch = 0; + pitch = 0; current_time = -1; UpdateCrookedHouseOperating(); break; @@ -2966,9 +2966,9 @@ void Vehicle::UpdateCrashSetup() trainVehicle->sub_state = 0; int32_t trainX = stru_9A3AC4[trainVehicle->Orientation / 2].x; int32_t trainY = stru_9A3AC4[trainVehicle->Orientation / 2].y; - auto trainZ = kUnk9A38D4[trainVehicle->Pitch] >> 23; + auto trainZ = kUnk9A38D4[trainVehicle->pitch] >> 23; - int32_t ecx = kUnk9A37E4[trainVehicle->Pitch] >> 15; + int32_t ecx = kUnk9A37E4[trainVehicle->pitch] >> 15; trainX *= ecx; trainY *= ecx; trainX >>= 16; @@ -3425,7 +3425,7 @@ void Vehicle::UpdateUnloadingPassengers() if (curRide->mode == RideMode::forwardRotation || curRide->mode == RideMode::backwardRotation) { - uint8_t seat = ((-Pitch) >> 3) & 0xF; + uint8_t seat = ((-pitch) >> 3) & 0xF; if (restraints_position == 255 && !peep[seat * 2].IsNull()) { next_free_seat -= 2; @@ -4074,10 +4074,10 @@ void Vehicle::UpdateSwinging() if (spriteType != -128) { current_time++; - if (static_cast(spriteType) != Pitch) + if (static_cast(spriteType) != pitch) { // Used to know which sprite to draw - Pitch = static_cast(spriteType); + pitch = static_cast(spriteType); Invalidate(); } return; @@ -4152,14 +4152,14 @@ void Vehicle::UpdateFerrisWheelRotating() ferris_wheel_var_1 = curFerrisWheelVar0; } - uint8_t rotation = Pitch; + uint8_t rotation = pitch; if (curRide->mode == RideMode::forwardRotation) rotation++; else rotation--; rotation &= 0x7F; - Pitch = rotation; + pitch = rotation; if (rotation == sub_state) NumRotations++; @@ -4173,7 +4173,7 @@ void Vehicle::UpdateFerrisWheelRotating() subState--; subState &= 0x7F; - if (subState == Pitch) + if (subState == pitch) { bool shouldStop = true; if (curRide->status != RideStatus::closed) @@ -4200,7 +4200,7 @@ void Vehicle::UpdateFerrisWheelRotating() subState -= 8; subState &= 0x7F; - if (subState != Pitch) + if (subState != pitch) return; SetState(Vehicle::Status::Arriving); @@ -4222,9 +4222,9 @@ void Vehicle::UpdateSimulatorOperating() if (al != 0xFF) { current_time++; - if (al == Pitch) + if (al == pitch) return; - Pitch = al; + pitch = al; Invalidate(); return; } @@ -4295,9 +4295,9 @@ void Vehicle::UpdateRotating() if (sprite != 0xFF) { current_time = time; - if (sprite == Pitch) + if (sprite == pitch) return; - Pitch = sprite; + pitch = sprite; Invalidate(); return; } @@ -4348,9 +4348,9 @@ void Vehicle::UpdateSpaceRingsOperating() if (spriteType != 255) { current_time++; - if (spriteType != Pitch) + if (spriteType != pitch) { - Pitch = spriteType; + pitch = spriteType; Invalidate(); } } @@ -4370,15 +4370,15 @@ void Vehicle::UpdateHauntedHouseOperating() if (_vehicleBreakdown == 0) return; - if (Pitch != 0) + if (pitch != 0) { if (getGameState().currentTicks & 1) { - Pitch++; + pitch++; Invalidate(); - if (Pitch == 19) - Pitch = 0; + if (pitch == 19) + pitch = 0; } } @@ -4396,7 +4396,7 @@ void Vehicle::UpdateHauntedHouseOperating() OpenRCT2::Audio::Play3D(OpenRCT2::Audio::SoundId::HauntedHouseScare, GetLocation()); break; case 75: - Pitch = 1; + pitch = 1; Invalidate(); break; case 400: @@ -4406,7 +4406,7 @@ void Vehicle::UpdateHauntedHouseOperating() OpenRCT2::Audio::Play3D(OpenRCT2::Audio::SoundId::HauntedHouseScare, GetLocation()); break; case 775: - Pitch = 1; + pitch = 1; Invalidate(); break; case 1100: @@ -4449,15 +4449,15 @@ void Vehicle::UpdateTopSpinOperating() if (rotation != 0xFF) { current_time = current_time + 1; - if (rotation != Pitch) + if (rotation != pitch) { - Pitch = rotation; + pitch = rotation; Invalidate(); } rotation = sprite_map[current_time].bank_rotation; - if (rotation != bank_rotation) + if (rotation != roll) { - bank_rotation = rotation; + roll = rotation; Invalidate(); } return; @@ -4987,17 +4987,17 @@ OpenRCT2::Audio::SoundId Vehicle::UpdateScreamSound() for (Vehicle* vehicle2 = getGameState().entities.GetEntity(Id); vehicle2 != nullptr; vehicle2 = getGameState().entities.GetEntity(vehicle2->next_vehicle_on_train)) { - if (vehicle2->Pitch < 1) + if (vehicle2->pitch < 1) continue; - if (vehicle2->Pitch <= 4) + if (vehicle2->pitch <= 4) return ProduceScreamSound(totalNumPeeps); - if (vehicle2->Pitch < 9) + if (vehicle2->pitch < 9) continue; - if (vehicle2->Pitch <= 15) + if (vehicle2->pitch <= 15) return ProduceScreamSound(totalNumPeeps); // Pitch 52 occurs on steep diagonal backward drops. // (50 and 51 occur on gentle ones.) - if (vehicle2->Pitch == 52) + if (vehicle2->pitch == 52) return ProduceScreamSound(totalNumPeeps); } return OpenRCT2::Audio::SoundId::Null; @@ -5009,17 +5009,17 @@ OpenRCT2::Audio::SoundId Vehicle::UpdateScreamSound() for (Vehicle* vehicle2 = getGameState().entities.GetEntity(Id); vehicle2 != nullptr; vehicle2 = getGameState().entities.GetEntity(vehicle2->next_vehicle_on_train)) { - if (vehicle2->Pitch < 5) + if (vehicle2->pitch < 5) continue; - if (vehicle2->Pitch <= 8) + if (vehicle2->pitch <= 8) return ProduceScreamSound(totalNumPeeps); - if (vehicle2->Pitch < 17) + if (vehicle2->pitch < 17) continue; - if (vehicle2->Pitch <= 23) + if (vehicle2->pitch <= 23) return ProduceScreamSound(totalNumPeeps); // Pitch 55 occurs on steep diagonal drops. // (53 and 54 occur on gentle ones.) - if (vehicle2->Pitch == 55) + if (vehicle2->pitch == 55) return ProduceScreamSound(totalNumPeeps); } return OpenRCT2::Audio::SoundId::Null; @@ -5069,8 +5069,8 @@ OpenRCT2::Audio::SoundId Vehicle::ProduceScreamSound(const int32_t totalNumPeeps */ GForces Vehicle::GetGForces() const { - int32_t gForceVert = ((static_cast(0x280000)) * kUnk9A37E4[Pitch]) >> 32; - gForceVert = ((static_cast(gForceVert)) * kUnk9A39C4[bank_rotation]) >> 32; + int32_t gForceVert = ((static_cast(0x280000)) * kUnk9A37E4[pitch]) >> 32; + gForceVert = ((static_cast(gForceVert)) * kUnk9A39C4[roll]) >> 32; const auto& ted = GetTrackElementDescriptor(GetTrackType()); const int32_t vertFactor = ted.verticalFactor(track_progress); @@ -5419,7 +5419,7 @@ void Vehicle::UpdateTrackMotionUpStopCheck() const gForces.LateralG = std::abs(gForces.LateralG); if (gForces.LateralG <= 150) { - if (AccelerationFromPitch[Pitch] < 0) + if (AccelerationFromPitch[pitch] < 0) { if (gForces.VerticalG > -40) { @@ -5432,7 +5432,7 @@ void Vehicle::UpdateTrackMotionUpStopCheck() const } } - if (Pitch != 8) + if (pitch != 8) { _vehicleMotionTrackFlags |= VEHICLE_UPDATE_MOTION_TRACK_FLAG_VEHICLE_DERAILED; } @@ -5445,7 +5445,7 @@ void Vehicle::UpdateTrackMotionUpStopCheck() const { auto gForces = GetGForces(); - if (AccelerationFromPitch[Pitch] < 0) + if (AccelerationFromPitch[pitch] < 0) { if (gForces.VerticalG > -45) { @@ -5460,7 +5460,7 @@ void Vehicle::UpdateTrackMotionUpStopCheck() const } } - if (Pitch != 8 && Pitch != 55) + if (pitch != 8 && pitch != 55) { _vehicleMotionTrackFlags |= VEHICLE_UPDATE_MOTION_TRACK_FLAG_VEHICLE_DERAILED; } @@ -6146,7 +6146,7 @@ static void AnimateSteamLocomotive(Vehicle& vehicle, const CarEntry& carEntry) || (vehicle.status != Vehicle::Status::MovingToEndOfStation && vehicle.status != Vehicle::Status::Arriving)) { CoordsXYZ steamOffset = ComputeSteamOffset( - carEntry.SteamEffect.Vertical, carEntry.SteamEffect.Longitudinal, vehicle.Pitch, vehicle.Orientation); + carEntry.SteamEffect.Vertical, carEntry.SteamEffect.Longitudinal, vehicle.pitch, vehicle.Orientation); SteamParticle::Create(CoordsXYZ(vehicle.x, vehicle.y, vehicle.z) + steamOffset); } } @@ -7316,12 +7316,12 @@ bool Vehicle::UpdateTrackMotionForwards(const CarEntry* carEntry, const Ride& cu remaining_distance -= SubpositionTranslationDistances[remainingDistanceFlags]; _vehicleCurPosition = nextVehiclePosition; Orientation = moveInfo->direction; - bank_rotation = moveInfo->bank_rotation; - Pitch = moveInfo->Pitch; + roll = moveInfo->roll; + pitch = moveInfo->pitch; - moveInfovehicleAnimationGroup = moveInfo->Pitch; + moveInfovehicleAnimationGroup = moveInfo->pitch; - if ((carEntry->flags & CAR_ENTRY_FLAG_WOODEN_WILD_MOUSE_SWING) && moveInfo->Pitch != 0) + if ((carEntry->flags & CAR_ENTRY_FLAG_WOODEN_WILD_MOUSE_SWING) && moveInfo->pitch != 0) { SwingSprite = 0; SwingPosition = 0; @@ -7630,11 +7630,11 @@ bool Vehicle::UpdateTrackMotionBackwards(const CarEntry* carEntry, const Ride& c _vehicleCurPosition = nextVehiclePosition; Orientation = moveInfo->direction; - bank_rotation = moveInfo->bank_rotation; - Pitch = moveInfo->Pitch; - moveInfoVehicleAnimationGroup = moveInfo->Pitch; + roll = moveInfo->roll; + pitch = moveInfo->pitch; + moveInfoVehicleAnimationGroup = moveInfo->pitch; - if ((carEntry->flags & CAR_ENTRY_FLAG_WOODEN_WILD_MOUSE_SWING) && Pitch != 0) + if ((carEntry->flags & CAR_ENTRY_FLAG_WOODEN_WILD_MOUSE_SWING) && pitch != 0) { SwingSprite = 0; SwingPosition = 0; @@ -7714,7 +7714,7 @@ bool Vehicle::UpdateTrackMotionBackwards(const CarEntry* carEntry, const Ride& c Loc6DCDE4(curRide); return Vehicle::UpdateMiniGolfSubroutineStatus::stop; } - acceleration = AccelerationFromPitch[Pitch]; + acceleration = AccelerationFromPitch[pitch]; _vehicleUnkF64E10++; return Vehicle::UpdateMiniGolfSubroutineStatus::restart; } @@ -7736,7 +7736,7 @@ bool Vehicle::UpdateTrackMotionBackwards(const CarEntry* carEntry, const Ride& c Loc6DCDE4(curRide); return Vehicle::UpdateMiniGolfSubroutineStatus::stop; } - acceleration = AccelerationFromPitch[Pitch]; + acceleration = AccelerationFromPitch[pitch]; _vehicleUnkF64E10++; return Vehicle::UpdateMiniGolfSubroutineStatus::restart; } @@ -7764,7 +7764,7 @@ bool Vehicle::UpdateTrackMotionBackwards(const CarEntry* carEntry, const Ride& c Loc6DCDE4(curRide); return Vehicle::UpdateMiniGolfSubroutineStatus::stop; } - acceleration = AccelerationFromPitch[Pitch]; + acceleration = AccelerationFromPitch[pitch]; _vehicleUnkF64E10++; return Vehicle::UpdateMiniGolfSubroutineStatus::restart; } @@ -7781,7 +7781,7 @@ bool Vehicle::UpdateTrackMotionBackwards(const CarEntry* carEntry, const Ride& c Loc6DCDE4(curRide); return Vehicle::UpdateMiniGolfSubroutineStatus::stop; } - acceleration = AccelerationFromPitch[Pitch]; + acceleration = AccelerationFromPitch[pitch]; _vehicleUnkF64E10++; return Vehicle::UpdateMiniGolfSubroutineStatus::restart; } @@ -7810,7 +7810,7 @@ bool Vehicle::UpdateTrackMotionBackwards(const CarEntry* carEntry, const Ride& c Loc6DCDE4(curRide); return Vehicle::UpdateMiniGolfSubroutineStatus::stop; } - acceleration = AccelerationFromPitch[Pitch]; + acceleration = AccelerationFromPitch[pitch]; _vehicleUnkF64E10++; return Vehicle::UpdateMiniGolfSubroutineStatus::restart; } @@ -7827,7 +7827,7 @@ bool Vehicle::UpdateTrackMotionBackwards(const CarEntry* carEntry, const Ride& c Loc6DCDE4(curRide); return Vehicle::UpdateMiniGolfSubroutineStatus::stop; } - acceleration = AccelerationFromPitch[Pitch]; + acceleration = AccelerationFromPitch[pitch]; _vehicleUnkF64E10++; return Vehicle::UpdateMiniGolfSubroutineStatus::restart; } @@ -7863,7 +7863,7 @@ bool Vehicle::UpdateTrackMotionBackwards(const CarEntry* carEntry, const Ride& c Loc6DCDE4(curRide); return Vehicle::UpdateMiniGolfSubroutineStatus::stop; } - acceleration = AccelerationFromPitch[Pitch]; + acceleration = AccelerationFromPitch[pitch]; _vehicleUnkF64E10++; return Vehicle::UpdateMiniGolfSubroutineStatus::restart; } @@ -7902,7 +7902,7 @@ bool Vehicle::UpdateTrackMotionBackwards(const CarEntry* carEntry, const Ride& c _vehicleMotionTrackFlags |= VEHICLE_UPDATE_MOTION_TRACK_FLAG_5; _vehicleVelocityF64E0C -= remaining_distance + 1; remaining_distance = -1; - acceleration += AccelerationFromPitch[Pitch]; + acceleration += AccelerationFromPitch[pitch]; _vehicleUnkF64E10++; return UpdateMiniGolfSubroutineStatus::carryOn; } @@ -7919,7 +7919,7 @@ bool Vehicle::UpdateTrackMotionBackwards(const CarEntry* carEntry, const Ride& c { Loc6DCDE4(curRide); } - acceleration += AccelerationFromPitch[Pitch]; + acceleration += AccelerationFromPitch[pitch]; _vehicleUnkF64E10++; return UpdateMiniGolfSubroutineStatus::carryOn; } @@ -8061,8 +8061,8 @@ bool Vehicle::UpdateTrackMotionBackwards(const CarEntry* carEntry, const Ride& c _vehicleCurPosition = trackPos; Orientation = moveInfo->direction; - bank_rotation = moveInfo->bank_rotation; - Pitch = moveInfo->Pitch; + roll = moveInfo->roll; + pitch = moveInfo->pitch; if (this == _vehicleFrontVehicle) { @@ -8077,7 +8077,7 @@ bool Vehicle::UpdateTrackMotionBackwards(const CarEntry* carEntry, const Ride& c Loc6DCDE4(curRide); return UpdateMiniGolfSubroutineStatus::stop; } - acceleration = AccelerationFromPitch[Pitch]; + acceleration = AccelerationFromPitch[pitch]; _vehicleUnkF64E10++; } } @@ -8095,7 +8095,7 @@ bool Vehicle::UpdateTrackMotionBackwards(const CarEntry* carEntry, const Ride& c _vehicleMotionTrackFlags |= VEHICLE_UPDATE_MOTION_TRACK_FLAG_5; _vehicleVelocityF64E0C -= remaining_distance + 1; remaining_distance = -1; - acceleration += AccelerationFromPitch[Pitch]; + acceleration += AccelerationFromPitch[pitch]; _vehicleUnkF64E10++; continue; } @@ -8108,7 +8108,7 @@ bool Vehicle::UpdateTrackMotionBackwards(const CarEntry* carEntry, const Ride& c _vehicleMotionTrackFlags |= VEHICLE_UPDATE_MOTION_TRACK_FLAG_5; _vehicleVelocityF64E0C -= remaining_distance - 0x368A; remaining_distance = 0x368A; - acceleration = AccelerationFromPitch[Pitch]; + acceleration = AccelerationFromPitch[pitch]; _vehicleUnkF64E10++; return Vehicle::UpdateMiniGolfSubroutineStatus::restart; } @@ -8151,8 +8151,8 @@ bool Vehicle::UpdateTrackMotionBackwards(const CarEntry* carEntry, const Ride& c _vehicleCurPosition = trackPos; Orientation = moveInfo->direction; - bank_rotation = moveInfo->bank_rotation; - Pitch = moveInfo->Pitch; + roll = moveInfo->roll; + pitch = moveInfo->pitch; if (this == _vehicleFrontVehicle) { @@ -8178,7 +8178,7 @@ bool Vehicle::UpdateTrackMotionBackwards(const CarEntry* carEntry, const Ride& c vEBP->velocity = vEDI->velocity >> 1; } _vehicleMotionTrackFlags |= VEHICLE_UPDATE_MOTION_TRACK_FLAG_2; - acceleration = AccelerationFromPitch[Pitch]; + acceleration = AccelerationFromPitch[pitch]; _vehicleUnkF64E10++; return UpdateMiniGolfSubroutineStatus::restart; } @@ -8190,7 +8190,7 @@ bool Vehicle::UpdateTrackMotionBackwards(const CarEntry* carEntry, const Ride& c Loc6DCDE4(curRide); return UpdateMiniGolfSubroutineStatus::stop; } - acceleration += AccelerationFromPitch[Pitch]; + acceleration += AccelerationFromPitch[pitch]; _vehicleUnkF64E10++; } } @@ -8204,7 +8204,7 @@ bool Vehicle::UpdateTrackMotionBackwards(const CarEntry* carEntry, const Ride& c void Vehicle::UpdateTrackMotionMiniGolfVehicle(const Ride& curRide, const RideObjectEntry& rideEntry, const CarEntry* carEntry) { _vehicleUnkF64E10 = 1; - acceleration = AccelerationFromPitch[Pitch]; + acceleration = AccelerationFromPitch[pitch]; if (!HasFlag(VehicleFlags::MoveSingleCar)) { remaining_distance = _vehicleVelocityF64E0C + remaining_distance; @@ -8485,7 +8485,7 @@ int32_t Vehicle::UpdateTrackMotionPoweredRideAcceleration( spin_speed = std::clamp(spin_speed, kVehicleMinSpinSpeedWaterRide, kVehicleMaxSpinSpeedWaterRide); } - if (Pitch != 0) + if (pitch != 0) { if (poweredAcceleration < 0) { @@ -8495,7 +8495,7 @@ int32_t Vehicle::UpdateTrackMotionPoweredRideAcceleration( if (carEntry->flags & CAR_ENTRY_FLAG_SPINNING) { // If the vehicle is on the up slope kill the spin speedModifier - if (Pitch == 2) + if (pitch == 2) { spin_speed = 0; } @@ -8530,7 +8530,7 @@ void Vehicle::UpdateTrackMotionPreUpdate( { car.UpdateAdditionalAnimation(); } - car.acceleration = AccelerationFromPitch[car.Pitch]; + car.acceleration = AccelerationFromPitch[car.pitch]; _vehicleUnkF64E10 = 1; if (!car.HasFlag(VehicleFlags::MoveSingleCar)) @@ -8558,7 +8558,7 @@ void Vehicle::UpdateTrackMotionPreUpdate( { break; } - car.acceleration += AccelerationFromPitch[car.Pitch]; + car.acceleration += AccelerationFromPitch[car.pitch]; _vehicleUnkF64E10++; continue; } @@ -8576,7 +8576,7 @@ void Vehicle::UpdateTrackMotionPreUpdate( { break; } - car.acceleration = AccelerationFromPitch[car.Pitch]; + car.acceleration = AccelerationFromPitch[car.pitch]; _vehicleUnkF64E10++; continue; } @@ -8994,8 +8994,8 @@ void Vehicle::Serialise(DataSerialiser& stream) { EntityBase::Serialise(stream); stream << SubType; - stream << Pitch; - stream << bank_rotation; + stream << pitch; + stream << roll; stream << remaining_distance; stream << velocity; stream << acceleration; diff --git a/src/openrct2/ride/Vehicle.h b/src/openrct2/ride/Vehicle.h index c3900a629c..0173dc1038 100644 --- a/src/openrct2/ride/Vehicle.h +++ b/src/openrct2/ride/Vehicle.h @@ -41,16 +41,16 @@ constexpr uint8_t NumVehiclePitches = 60; // Size: 0x09 struct VehicleInfo { - int16_t x; // 0x00 - int16_t y; // 0x02 - int16_t z; // 0x04 - uint8_t direction; // 0x06 - uint8_t Pitch; // 0x07 - uint8_t bank_rotation; // 0x08 + int16_t x; // 0x00 + int16_t y; // 0x02 + int16_t z; // 0x04 + uint8_t direction; // 0x06 + uint8_t pitch; // 0x07 + uint8_t roll; // 0x08 bool IsInvalid() const { - return x == 0 && y == 0 && z == 0 && direction == 0 && Pitch == 0 && bank_rotation == 0; + return x == 0 && y == 0 && z == 0 && direction == 0 && pitch == 0 && roll == 0; } }; @@ -107,8 +107,8 @@ struct Vehicle : EntityBase }; Type SubType; - uint8_t Pitch; - uint8_t bank_rotation; + uint8_t pitch; + uint8_t roll; int32_t remaining_distance; int32_t velocity; int32_t acceleration; diff --git a/src/openrct2/scripting/bindings/entity/ScVehicle.cpp b/src/openrct2/scripting/bindings/entity/ScVehicle.cpp index af1f159991..a8933558f4 100644 --- a/src/openrct2/scripting/bindings/entity/ScVehicle.cpp +++ b/src/openrct2/scripting/bindings/entity/ScVehicle.cpp @@ -140,7 +140,7 @@ namespace OpenRCT2::Scripting uint8_t ScVehicle::spriteType_get() const { auto vehicle = GetVehicle(); - return vehicle != nullptr ? vehicle->Pitch : 0; + return vehicle != nullptr ? vehicle->pitch : 0; } void ScVehicle::spriteType_set(uint8_t value) { @@ -148,7 +148,7 @@ namespace OpenRCT2::Scripting auto vehicle = GetVehicle(); if (vehicle != nullptr) { - vehicle->Pitch = value; + vehicle->pitch = value; vehicle->Invalidate(); } } @@ -337,7 +337,7 @@ namespace OpenRCT2::Scripting uint8_t ScVehicle::bankRotation_get() const { auto vehicle = GetVehicle(); - return vehicle != nullptr ? vehicle->bank_rotation : 0; + return vehicle != nullptr ? vehicle->roll : 0; } void ScVehicle::bankRotation_set(uint8_t value) { @@ -345,7 +345,7 @@ namespace OpenRCT2::Scripting auto vehicle = GetVehicle(); if (vehicle != nullptr) { - vehicle->bank_rotation = value; + vehicle->roll = value; vehicle->Invalidate(); } } diff --git a/src/openrct2/scripting/bindings/ride/ScTrackSegment.h b/src/openrct2/scripting/bindings/ride/ScTrackSegment.h index 3eee4d37af..c57d3f40d3 100644 --- a/src/openrct2/scripting/bindings/ride/ScTrackSegment.h +++ b/src/openrct2/scripting/bindings/ride/ScTrackSegment.h @@ -26,8 +26,8 @@ namespace OpenRCT2::Scripting dukSubposition.Set("y", value.y); dukSubposition.Set("z", value.z); dukSubposition.Set("yaw", value.direction); - dukSubposition.Set("pitch", value.Pitch); - dukSubposition.Set("roll", value.bank_rotation); + dukSubposition.Set("pitch", value.pitch); + dukSubposition.Set("roll", value.roll); return dukSubposition.Take(); }