mirror of https://github.com/OpenRCT2/OpenRCT2.git
Re-add boosters, fix typo
This commit is contained in:
parent
68ed96194f
commit
e82b19100d
|
@ -7425,7 +7425,7 @@ loc_6DB41D:
|
|||
}
|
||||
vehicle->track_direction = regs.bl & 3;
|
||||
vehicle->track_type |= trackType << 2;
|
||||
vehicle->break_speed = (mapElement->properties.track.sequence >> 4) << 1;
|
||||
vehicle->brake_speed = (mapElement->properties.track.sequence >> 4) << 1;
|
||||
if (trackType == TRACK_ELEM_ON_RIDE_PHOTO) {
|
||||
vehicle_trigger_on_ride_photo(vehicle, mapElement);
|
||||
}
|
||||
|
@ -7466,7 +7466,7 @@ loc_6DAEB9:
|
|||
ride->breakdown_reason_pending == BREAKDOWN_BRAKES_FAILURE &&
|
||||
ride->mechanic_status == RIDE_MECHANIC_STATUS_4
|
||||
)) {
|
||||
regs.eax = vehicle->break_speed << 16;
|
||||
regs.eax = vehicle->brake_speed << 16;
|
||||
if (regs.eax < _vehicleVelocityF64E08) {
|
||||
vehicle->acceleration = -_vehicleVelocityF64E08 * 16;
|
||||
}
|
||||
|
@ -7478,6 +7478,24 @@ loc_6DAEB9:
|
|||
}
|
||||
}
|
||||
}
|
||||
else if (trackType == TRACK_ELEM_RCTC_BOOSTER && rideEntry->ride_type[0] != RIDE_TYPE_WILD_MOUSE) {
|
||||
if (!(
|
||||
ride->lifecycle_flags & RIDE_LIFECYCLE_BROKEN_DOWN &&
|
||||
ride->breakdown_reason_pending == BREAKDOWN_BRAKES_FAILURE &&
|
||||
ride->mechanic_status == RIDE_MECHANIC_STATUS_4
|
||||
)) {
|
||||
regs.eax = (vehicle->brake_speed << 16) / 2;
|
||||
if (regs.eax > _vehicleVelocityF64E08) {
|
||||
vehicle->acceleration = _vehicleVelocityF64E08 * 16;
|
||||
}
|
||||
// else if (!(gCurrentTicks & 0x0F)) {
|
||||
// if (_vehicleF64E2C == 0) {
|
||||
// _vehicleF64E2C++;
|
||||
// audio_play_sound_at_location(SOUND_51, vehicle->x, vehicle->y, vehicle->z);
|
||||
// }
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
if ((trackType == TRACK_ELEM_FLAT && ride->type == RIDE_TYPE_REVERSE_FREEFALL_COASTER) ||
|
||||
(trackType == TRACK_ELEM_POWERED_LIFT)
|
||||
|
@ -7790,7 +7808,7 @@ static bool vehicle_update_track_motion_backwards_get_new_track(rct_vehicle *veh
|
|||
direction &= 3;
|
||||
vehicle->track_type = trackType << 2;
|
||||
vehicle->track_direction |= direction;
|
||||
vehicle->break_speed = (mapElement->properties.track.sequence >> 4) << 1;
|
||||
vehicle->brake_speed = (mapElement->properties.track.sequence >> 4) << 1;
|
||||
|
||||
// There are two bytes before the move info list
|
||||
uint16 trackTotalProgress = vehicle_get_move_info_size(vehicle->var_CD, vehicle->track_type);
|
||||
|
@ -7816,13 +7834,22 @@ loc_6DBA33:;
|
|||
}
|
||||
|
||||
if (trackType == TRACK_ELEM_BRAKES) {
|
||||
regs.eax = -(vehicle->break_speed << 16);
|
||||
regs.eax = -(vehicle->brake_speed << 16);
|
||||
if (regs.eax > _vehicleVelocityF64E08) {
|
||||
regs.eax = _vehicleVelocityF64E08 * -16;
|
||||
vehicle->acceleration = regs.eax;
|
||||
}
|
||||
}
|
||||
|
||||
// Bit of a hack. We need a flag or something similar to distinguish between spinning control track and boosters.
|
||||
if (trackType == TRACK_ELEM_RCTC_BOOSTER && rideEntry->ride_type[0] != RIDE_TYPE_WILD_MOUSE) {
|
||||
regs.eax = (vehicle->brake_speed << 16) / 2;
|
||||
if (regs.eax < _vehicleVelocityF64E08) {
|
||||
regs.eax = _vehicleVelocityF64E08 * 16;
|
||||
vehicle->acceleration = regs.eax;
|
||||
}
|
||||
}
|
||||
|
||||
regs.ax = vehicle->track_progress - 1;
|
||||
if (regs.ax == -1) {
|
||||
if (!vehicle_update_track_motion_backwards_get_new_track(vehicle, trackType, ride, rideEntry, (uint16 *)®s.ax)) {
|
||||
|
|
|
@ -187,7 +187,7 @@ typedef struct rct_vehicle {
|
|||
};
|
||||
union {
|
||||
uint8 var_CF;
|
||||
uint8 break_speed; // 0xCF
|
||||
uint8 brake_speed; // 0xCF
|
||||
};
|
||||
uint16 lost_time_out; // 0xD0
|
||||
sint8 vertical_drop_countdown; // 0xD1
|
||||
|
|
Loading…
Reference in New Issue