mirror of https://github.com/OpenRCT2/OpenRCT2.git
Limit inversions and holes to 31 (for now)
This commit is contained in:
parent
a3a1028385
commit
a27e04e5a3
|
@ -39,6 +39,10 @@
|
|||
|
||||
#define RCT12_PEEP_MAX_THOUGHTS 5
|
||||
|
||||
#define RCT12_MAX_INVERSIONS 31
|
||||
#define RCT12_MAX_GOLF_HOLES 31
|
||||
#define RCT12_MAX_HELICES 31
|
||||
|
||||
#pragma pack(push, 1)
|
||||
|
||||
struct rct12_award
|
||||
|
|
|
@ -561,9 +561,9 @@ void S6Exporter::ExportRide(rct2_ride* dst, const Ride* src)
|
|||
dst->turn_count_banked = src->turn_count_banked;
|
||||
dst->turn_count_sloped = src->turn_count_sloped;
|
||||
if (dst->type == RIDE_TYPE_MINI_GOLF)
|
||||
dst->inversions = std::min((uint8_t)src->holes, (uint8_t)31);
|
||||
dst->inversions = std::min((uint8_t)src->holes, (uint8_t)RCT12_MAX_GOLF_HOLES);
|
||||
else
|
||||
dst->inversions = std::min((uint8_t)src->inversions, (uint8_t)31);
|
||||
dst->inversions = std::min((uint8_t)src->inversions, (uint8_t)RCT12_MAX_INVERSIONS);
|
||||
dst->inversions |= (src->sheltered_eighths << 5);
|
||||
dst->drops = src->drops;
|
||||
dst->start_drop_height = src->start_drop_height;
|
||||
|
|
|
@ -39,6 +39,9 @@ struct Staff;
|
|||
#define MAX_RIDES 255
|
||||
#define RIDE_ID_NULL 255
|
||||
#define RIDE_ADJACENCY_CHECK_DISTANCE 5
|
||||
#define MAX_INVERSIONS RCT12_MAX_INVERSIONS
|
||||
#define MAX_GOLF_HOLES RCT12_MAX_GOLF_HOLES
|
||||
#define MAX_HELICES RCT12_MAX_HELICES
|
||||
|
||||
#pragma pack(push, 1)
|
||||
|
||||
|
|
|
@ -1785,7 +1785,7 @@ static void vehicle_update_measurements(rct_vehicle* vehicle)
|
|||
{
|
||||
if (track_flags & TRACK_ELEM_FLAG_IS_GOLF_HOLE)
|
||||
{
|
||||
if (ride->holes < 255)
|
||||
if (ride->holes < MAX_GOLF_HOLES)
|
||||
ride->holes++;
|
||||
}
|
||||
}
|
||||
|
@ -1793,7 +1793,7 @@ static void vehicle_update_measurements(rct_vehicle* vehicle)
|
|||
{
|
||||
if (track_flags & TRACK_ELEM_FLAG_NORMAL_TO_INVERSION)
|
||||
{
|
||||
if (ride->inversions < 255)
|
||||
if (ride->inversions < MAX_INVERSIONS)
|
||||
ride->inversions++;
|
||||
}
|
||||
}
|
||||
|
@ -1801,7 +1801,7 @@ static void vehicle_update_measurements(rct_vehicle* vehicle)
|
|||
if (track_flags & TRACK_ELEM_FLAG_HELIX)
|
||||
{
|
||||
uint8_t helixes = ride_get_helix_sections(ride);
|
||||
if (helixes != 0x1F)
|
||||
if (helixes != MAX_HELICES)
|
||||
helixes++;
|
||||
|
||||
ride->special_track_elements &= ~0x1F;
|
||||
|
|
Loading…
Reference in New Issue