Replace loc_6DBA33 with a loop

This commit is contained in:
Gymnasiast 2021-07-20 14:48:18 +02:00
parent 3966c6f7a4
commit 1965aaca73
No known key found for this signature in database
GPG Key ID: DBFFF47AB2CA3EDD
1 changed files with 119 additions and 117 deletions

View File

@ -8550,7 +8550,8 @@ bool Vehicle::UpdateTrackMotionBackwards(rct_ride_entry_vehicle* vehicleEntry, R
{
uint16_t otherVehicleIndex = SPRITE_INDEX_NULL;
loc_6DBA33:;
while (true)
{
auto trackType = GetTrackType();
if (trackType == TrackElemType::Flat && curRide->type == RIDE_TYPE_REVERSE_FREEFALL_COASTER)
{
@ -8599,7 +8600,8 @@ loc_6DBA33:;
{
const rct_vehicle_info* moveInfo = GetMoveInfo();
auto loc = TrackLocation
+ CoordsXYZ{ moveInfo->x, moveInfo->y, moveInfo->z + GetRideTypeDescriptor(curRide->type).Heights.VehicleZOffset };
+ CoordsXYZ{ moveInfo->x, moveInfo->y,
moveInfo->z + GetRideTypeDescriptor(curRide->type).Heights.VehicleZOffset };
uint8_t remainingDistanceFlags = 0;
if (loc.x != unk_F64E20.x)
@ -8683,7 +8685,7 @@ loc_6DBA33:;
}
acceleration += dword_9A2970[moveInfoVehicleSpriteType];
_vehicleUnkF64E10++;
goto loc_6DBA33;
}
}
/**