mirror of https://github.com/OpenRCT2/OpenRCT2.git
Allow TileCoordsXYZ conversion to CoordsXYZ
This commit is contained in:
parent
d9348cf562
commit
aca4d39107
|
@ -2899,7 +2899,8 @@ static void ride_music_update(Ride* ride)
|
|||
return;
|
||||
}
|
||||
|
||||
CoordsXYZ rideCoords{ ride->stations[0].Start.x * 32, ride->stations[0].Start.y * 32, ride->stations[0].Height * 8 };
|
||||
TileCoordsXYZ rideTileCoords{ ride->stations[0].Start.x, ride->stations[0].Start.y, ride->stations[0].Height };
|
||||
CoordsXYZ rideCoords{rideTileCoords.ToCoordsXYZ()};
|
||||
rideCoords = { rideCoords.ToTileCentre(), rideCoords.z };
|
||||
|
||||
int32_t sampleRate = 22050;
|
||||
|
|
|
@ -273,6 +273,11 @@ struct TileCoordsXYZ
|
|||
return !(*this == other);
|
||||
}
|
||||
|
||||
CoordsXYZ ToCoordsXYZ()
|
||||
{
|
||||
return { x * 32, y * 32, z * 8 };
|
||||
}
|
||||
|
||||
int32_t x = 0, y = 0, z = 0;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue