1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-06 06:32:56 +01:00

Rename members of VehicleInfo

This commit is contained in:
Gymnasiast
2025-12-12 13:19:53 +01:00
parent 5f81eb8829
commit d77057c2d5
4 changed files with 12 additions and 12 deletions

View File

@@ -281,7 +281,7 @@ bool Vehicle::CableLiftUpdateTrackMotionForwards()
remaining_distance -= Geometry::getTranslationDistance(nextVehiclePosition - _vehicleCurPosition, false);
_vehicleCurPosition = nextVehiclePosition;
Orientation = moveInfo->direction;
Orientation = moveInfo->yaw;
roll = moveInfo->roll;
pitch = moveInfo->pitch;
@@ -341,7 +341,7 @@ bool Vehicle::CableLiftUpdateTrackMotionBackwards()
remaining_distance += Geometry::getTranslationDistance(nextVehiclePosition - _vehicleCurPosition, false);
_vehicleCurPosition = nextVehiclePosition;
Orientation = moveInfo->direction;
Orientation = moveInfo->yaw;
roll = moveInfo->roll;
pitch = moveInfo->pitch;

View File

@@ -281,12 +281,12 @@ void Vehicle::UpdateTrackChange()
return;
const auto moveInfo = GetMoveInfo();
if (moveInfo == nullptr || moveInfo->IsInvalid())
if (moveInfo == nullptr || moveInfo->isInvalid())
return;
_vehicleCurPosition = TrackLocation
+ CoordsXYZ{ moveInfo->x, moveInfo->y, moveInfo->z + GetRideTypeDescriptor((*curRide).type).Heights.VehicleZOffset };
Orientation = moveInfo->direction;
Orientation = moveInfo->yaw;
roll = moveInfo->roll;
pitch = moveInfo->pitch;
MoveTo(_vehicleCurPosition);
@@ -6985,7 +6985,7 @@ bool Vehicle::UpdateTrackMotionForwards(const CarEntry* carEntry, const Ride& cu
}
_vehicleCurPosition = nextVehiclePosition;
Orientation = moveInfo->direction;
Orientation = moveInfo->yaw;
roll = moveInfo->roll;
pitch = moveInfo->pitch;
@@ -7283,7 +7283,7 @@ bool Vehicle::UpdateTrackMotionBackwards(const CarEntry* carEntry, const Ride& c
remaining_distance += Geometry::getTranslationDistance(nextVehiclePosition - _vehicleCurPosition, false);
_vehicleCurPosition = nextVehiclePosition;
Orientation = moveInfo->direction;
Orientation = moveInfo->yaw;
roll = moveInfo->roll;
pitch = moveInfo->pitch;
@@ -7713,7 +7713,7 @@ bool Vehicle::UpdateTrackMotionBackwards(const CarEntry* carEntry, const Ride& c
}
_vehicleCurPosition = trackPos;
Orientation = moveInfo->direction;
Orientation = moveInfo->yaw;
roll = moveInfo->roll;
pitch = moveInfo->pitch;
@@ -7803,7 +7803,7 @@ bool Vehicle::UpdateTrackMotionBackwards(const CarEntry* carEntry, const Ride& c
}
_vehicleCurPosition = trackPos;
Orientation = moveInfo->direction;
Orientation = moveInfo->yaw;
roll = moveInfo->roll;
pitch = moveInfo->pitch;

View File

@@ -39,13 +39,13 @@ struct VehicleInfo
int16_t x; // 0x00
int16_t y; // 0x02
int16_t z; // 0x04
uint8_t direction; // 0x06
uint8_t yaw; // 0x06
VehiclePitch pitch; // 0x07
VehicleRoll roll; // 0x08
bool IsInvalid() const
bool isInvalid() const
{
return x == 0 && y == 0 && z == 0 && direction == 0 && pitch == VehiclePitch::flat && roll == VehicleRoll::unbanked;
return x == 0 && y == 0 && z == 0 && yaw == 0 && pitch == VehiclePitch::flat && roll == VehicleRoll::unbanked;
}
};

View File

@@ -25,7 +25,7 @@ namespace OpenRCT2::Scripting
dukSubposition.Set("x", value.x);
dukSubposition.Set("y", value.y);
dukSubposition.Set("z", value.z);
dukSubposition.Set("yaw", value.direction);
dukSubposition.Set("yaw", value.yaw);
dukSubposition.Set("pitch", EnumValue(value.pitch));
dukSubposition.Set("roll", EnumValue(value.roll));
return dukSubposition.Take();