mirror of
https://github.com/OpenRCT2/OpenRCT2.git
synced 2025-01-22 18:31:59 -05:00
(Try to) make proximity track type calculation more robust
This commit is contained in:
parent
a28c22866c
commit
92dc3f4aa9
2 changed files with 10 additions and 2 deletions
|
@ -780,7 +780,10 @@ void S6Exporter::ExportRideRatingsCalcData()
|
|||
dst.proximity_start_z = src.ProximityStart.z;
|
||||
dst.current_ride = src.CurrentRide;
|
||||
dst.state = src.State;
|
||||
dst.proximity_track_type = OpenRCT2TrackTypeToRCT2(src.ProximityTrackType);
|
||||
if (src.ProximityTrackType == TrackElemType::None)
|
||||
dst.proximity_track_type = 0xFF;
|
||||
else
|
||||
dst.proximity_track_type = OpenRCT2TrackTypeToRCT2(src.ProximityTrackType);
|
||||
dst.proximity_base_height = src.ProximityBaseHeight;
|
||||
dst.proximity_total = src.ProximityTotal;
|
||||
for (size_t i = 0; i < std::size(dst.proximity_scores); i++)
|
||||
|
|
|
@ -803,7 +803,12 @@ public:
|
|||
dst.ProximityStart = { src.proximity_start_x, src.proximity_start_y, src.proximity_start_z };
|
||||
dst.CurrentRide = src.current_ride;
|
||||
dst.State = src.state;
|
||||
dst.ProximityTrackType = RCT2TrackTypeToOpenRCT2(src.proximity_track_type, _s6.rides[src.current_ride].type);
|
||||
if (src.proximity_track_type == 0xFF)
|
||||
dst.ProximityTrackType = TrackElemType::None;
|
||||
else if (src.current_ride < RCT12_MAX_RIDES_IN_PARK)
|
||||
dst.ProximityTrackType = RCT2TrackTypeToOpenRCT2(src.proximity_track_type, _s6.rides[src.current_ride].type);
|
||||
else
|
||||
dst.ProximityTrackType = src.proximity_track_type;
|
||||
dst.ProximityBaseHeight = src.proximity_base_height;
|
||||
dst.ProximityTotal = src.proximity_total;
|
||||
for (size_t i = 0; i < std::size(src.proximity_scores); i++)
|
||||
|
|
Loading…
Reference in a new issue