mirror of https://github.com/OpenRCT2/OpenRCT2.git
Part of #9473: Create Vehicle::TestReset
Converted from vehicle_test_reset
This commit is contained in:
parent
158adfba82
commit
28c861ee7e
|
@ -3036,11 +3036,9 @@ void vehicle_update_test_finish(Vehicle* vehicle)
|
||||||
*
|
*
|
||||||
* rct2: 0x006D6BE7
|
* rct2: 0x006D6BE7
|
||||||
*/
|
*/
|
||||||
void vehicle_test_reset(Vehicle* vehicle)
|
static void test_reset(ride_id_t rideId, StationIndex curStation)
|
||||||
{
|
{
|
||||||
vehicle->update_flags |= VEHICLE_UPDATE_FLAG_TESTING;
|
auto ride = get_ride(rideId);
|
||||||
|
|
||||||
auto ride = get_ride(vehicle->ride);
|
|
||||||
if (ride == nullptr)
|
if (ride == nullptr)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -3075,8 +3073,14 @@ void vehicle_test_reset(Vehicle* vehicle)
|
||||||
station.SegmentTime = 0;
|
station.SegmentTime = 0;
|
||||||
}
|
}
|
||||||
ride->total_air_time = 0;
|
ride->total_air_time = 0;
|
||||||
ride->current_test_station = vehicle->current_station;
|
ride->current_test_station = curStation;
|
||||||
window_invalidate_by_number(WC_RIDE, vehicle->ride);
|
window_invalidate_by_number(WC_RIDE, rideId);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Vehicle::TestReset()
|
||||||
|
{
|
||||||
|
update_flags |= VEHICLE_UPDATE_FLAG_TESTING;
|
||||||
|
test_reset(ride, current_station);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Vehicle::CurrentTowerElementIsTop()
|
bool Vehicle::CurrentTowerElementIsTop()
|
||||||
|
@ -3203,7 +3207,7 @@ void Vehicle::UpdateDeparting()
|
||||||
}
|
}
|
||||||
else if (!(curRide->lifecycle_flags & RIDE_LIFECYCLE_TEST_IN_PROGRESS) && !IsGhost())
|
else if (!(curRide->lifecycle_flags & RIDE_LIFECYCLE_TEST_IN_PROGRESS) && !IsGhost())
|
||||||
{
|
{
|
||||||
vehicle_test_reset(this);
|
TestReset();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4174,7 +4178,7 @@ void Vehicle::UpdateTravellingCableLift()
|
||||||
}
|
}
|
||||||
else if (!(curRide->lifecycle_flags & RIDE_LIFECYCLE_TEST_IN_PROGRESS) && !IsGhost())
|
else if (!(curRide->lifecycle_flags & RIDE_LIFECYCLE_TEST_IN_PROGRESS) && !IsGhost())
|
||||||
{
|
{
|
||||||
vehicle_test_reset(this);
|
TestReset();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -360,6 +360,7 @@ private:
|
||||||
bool CurrentTowerElementIsTop();
|
bool CurrentTowerElementIsTop();
|
||||||
bool UpdateTrackMotionForwards(rct_ride_entry_vehicle* vehicleEntry, Ride* curRide, rct_ride_entry* rideEntry);
|
bool UpdateTrackMotionForwards(rct_ride_entry_vehicle* vehicleEntry, Ride* curRide, rct_ride_entry* rideEntry);
|
||||||
bool UpdateTrackMotionBackwards(rct_ride_entry_vehicle* vehicleEntry, Ride* curRide, rct_ride_entry* rideEntry);
|
bool UpdateTrackMotionBackwards(rct_ride_entry_vehicle* vehicleEntry, Ride* curRide, rct_ride_entry* rideEntry);
|
||||||
|
void TestReset();
|
||||||
void PeepEasterEggHereWeAre() const;
|
void PeepEasterEggHereWeAre() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -562,7 +563,6 @@ int32_t vehicle_is_used_in_pairs(const Vehicle* vehicle);
|
||||||
int32_t vehicle_get_total_num_peeps(const Vehicle* vehicle);
|
int32_t vehicle_get_total_num_peeps(const Vehicle* vehicle);
|
||||||
void vehicle_invalidate_window(Vehicle* vehicle);
|
void vehicle_invalidate_window(Vehicle* vehicle);
|
||||||
void vehicle_update_test_finish(Vehicle* vehicle);
|
void vehicle_update_test_finish(Vehicle* vehicle);
|
||||||
void vehicle_test_reset(Vehicle* vehicle);
|
|
||||||
const rct_vehicle_info* vehicle_get_move_info(int32_t trackSubposition, int32_t typeAndDirection, int32_t offset);
|
const rct_vehicle_info* vehicle_get_move_info(int32_t trackSubposition, int32_t typeAndDirection, int32_t offset);
|
||||||
uint16_t vehicle_get_move_info_size(int32_t trackSubposition, int32_t typeAndDirection);
|
uint16_t vehicle_get_move_info_size(int32_t trackSubposition, int32_t typeAndDirection);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue