1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-23 06:44:38 +01:00

Remove goto label loc_6DCD6B

This commit is contained in:
frutiemax
2022-12-23 21:34:45 -05:00
committed by Gymnasiast
parent 62be6090a8
commit 83d840f3a5

View File

@@ -8605,7 +8605,27 @@ Loc6DCC2C:
otherVehicleIndex = EntityId::FromUnderlying(var_44); // Possibly wrong?.
if (UpdateMotionCollisionDetection(trackPos, &otherVehicleIndex))
{
goto Loc6DCD6B;
_vehicleVelocityF64E0C -= remaining_distance - 0x368A;
remaining_distance = 0x368A;
{
Vehicle* vEBP = GetEntity<Vehicle>(otherVehicleIndex);
if (vEBP == nullptr)
{
return;
}
Vehicle* vEDI = gCurrentVehicle;
if (abs(vEDI->velocity - vEBP->velocity) > 14.0_mph)
{
if (!(carEntry->flags & CAR_ENTRY_FLAG_BOAT_HIRE_COLLISION_DETECTION))
{
_vehicleMotionTrackFlags |= VEHICLE_UPDATE_MOTION_TRACK_FLAG_VEHICLE_COLLISION;
}
}
vEDI->velocity = vEBP->velocity >> 1;
vEBP->velocity = vEDI->velocity >> 1;
}
_vehicleMotionTrackFlags |= VEHICLE_UPDATE_MOTION_TRACK_FLAG_2;
goto Loc6DC99A;
}
}
}
@@ -8625,29 +8645,6 @@ Loc6DCD4A:
_vehicleVelocityF64E0C -= remaining_distance - 0x368A;
remaining_distance = 0x368A;
goto Loc6DC99A;
Loc6DCD6B:
_vehicleVelocityF64E0C -= remaining_distance - 0x368A;
remaining_distance = 0x368A;
{
Vehicle* vEBP = GetEntity<Vehicle>(otherVehicleIndex);
if (vEBP == nullptr)
{
return;
}
Vehicle* vEDI = gCurrentVehicle;
if (abs(vEDI->velocity - vEBP->velocity) > 14.0_mph)
{
if (!(carEntry->flags & CAR_ENTRY_FLAG_BOAT_HIRE_COLLISION_DETECTION))
{
_vehicleMotionTrackFlags |= VEHICLE_UPDATE_MOTION_TRACK_FLAG_VEHICLE_COLLISION;
}
}
vEDI->velocity = vEBP->velocity >> 1;
vEBP->velocity = vEDI->velocity >> 1;
}
_vehicleMotionTrackFlags |= VEHICLE_UPDATE_MOTION_TRACK_FLAG_2;
goto Loc6DC99A;
}
void Vehicle::Loc6DCDE4(const Ride& curRide)