Replace 2 occurences of regs.eax

This commit is contained in:
Gymnasiast 2021-01-17 19:46:27 +01:00
parent b24962546e
commit d9fb4616a6
No known key found for this signature in database
GPG key ID: DBFFF47AB2CA3EDD

View file

@ -8591,22 +8591,18 @@ loc_6DBA33:;
if (trackType == TrackElemType::Brakes)
{
regs.eax = -(brake_speed << 16);
if (regs.eax > _vehicleVelocityF64E08)
if (-(brake_speed << 16) > _vehicleVelocityF64E08)
{
regs.eax = _vehicleVelocityF64E08 * -16;
acceleration = regs.eax;
acceleration = _vehicleVelocityF64E08 * -16;
}
}
if (TrackTypeIsBooster(curRide->type, trackType))
{
regs.eax = get_booster_speed(curRide->type, (brake_speed << 16));
if (regs.eax < _vehicleVelocityF64E08)
auto boosterSpeed = get_booster_speed(curRide->type, (brake_speed << 16));
if (boosterSpeed < _vehicleVelocityF64E08)
{
regs.eax = RideTypeDescriptors[curRide->type].OperatingSettings.BoosterAcceleration << 16;
acceleration = regs.eax;
acceleration = RideTypeDescriptors[curRide->type].OperatingSettings.BoosterAcceleration << 16;
}
}