Rename subposition rotations to yaw, pitch, roll

This commit is contained in:
Bas 2022-08-21 22:08:22 +02:00
parent 8c39881353
commit 885be63797
3 changed files with 11 additions and 10 deletions

View File

@ -1245,12 +1245,12 @@ declare global {
*/
readonly elements: TrackSegmentElement[];
/**
/**
* Gets a length of the subpositions list for this track segment.
*/
getSubpositionLength(subpositionType: number, direction: Direction): number;
/**
/**
* Gets all of the subpositions for this track segment. These subpositions are used for the
* pathing of vehicles when moving along the track.
*/
@ -1281,9 +1281,10 @@ declare global {
* A single subposition on a track piece. These subpositions are used for the pathing of vehicles
* when moving along the track.
*/
interface TrackSubposition extends Readonly<CoordsXYZD> {
readonly angle: TrackSlope;
readonly banking: TrackBanking;
interface TrackSubposition extends Readonly<CoordsXYZ> {
readonly yaw: number;
readonly pitch: TrackSlope;
readonly roll: TrackBanking;
}
interface TrackIterator {
@ -1489,7 +1490,7 @@ declare global {
/**
* The type of subposition coordinates that this vehicle is using to find its
* position on the track.
* position on the track.
*/
readonly subposition: number;

View File

@ -46,7 +46,7 @@ namespace OpenRCT2
namespace OpenRCT2::Scripting
{
static constexpr int32_t OPENRCT2_PLUGIN_API_VERSION = 58;
static constexpr int32_t OPENRCT2_PLUGIN_API_VERSION = 59;
// Versions marking breaking changes.
static constexpr int32_t API_VERSION_33_PEEP_DEPRECATION = 33;

View File

@ -25,9 +25,9 @@ namespace OpenRCT2::Scripting
dukSubposition.Set("x", value.x);
dukSubposition.Set("y", value.y);
dukSubposition.Set("z", value.z);
dukSubposition.Set("direction", value.direction);
dukSubposition.Set("angle", value.Pitch);
dukSubposition.Set("banking", value.bank_rotation);
dukSubposition.Set("yaw", value.direction);
dukSubposition.Set("pitch", value.Pitch);
dukSubposition.Set("roll", value.bank_rotation);
return dukSubposition.Take();
}