mirror of https://github.com/OpenRCT2/OpenRCT2.git
Part of #9473: Convert cable_lift_update to Vehicle private method CableLiftUpdate
This commit is contained in:
parent
3bf316ee8c
commit
857db2925c
|
@ -88,27 +88,27 @@ Vehicle* cable_lift_segment_create(
|
|||
return current;
|
||||
}
|
||||
|
||||
void cable_lift_update(Vehicle* vehicle)
|
||||
void Vehicle::CableLiftUpdate()
|
||||
{
|
||||
switch (vehicle->status)
|
||||
switch (status)
|
||||
{
|
||||
case VEHICLE_STATUS_MOVING_TO_END_OF_STATION:
|
||||
cable_lift_update_moving_to_end_of_station(vehicle);
|
||||
cable_lift_update_moving_to_end_of_station(this);
|
||||
break;
|
||||
case VEHICLE_STATUS_WAITING_FOR_PASSENGERS:
|
||||
// Stays in this state until a train puts it into next state
|
||||
break;
|
||||
case VEHICLE_STATUS_WAITING_TO_DEPART:
|
||||
cable_lift_update_waiting_to_depart(vehicle);
|
||||
cable_lift_update_waiting_to_depart(this);
|
||||
break;
|
||||
case VEHICLE_STATUS_DEPARTING:
|
||||
cable_lift_update_departing(vehicle);
|
||||
cable_lift_update_departing(this);
|
||||
break;
|
||||
case VEHICLE_STATUS_TRAVELLING:
|
||||
cable_lift_update_travelling(vehicle);
|
||||
cable_lift_update_travelling(this);
|
||||
break;
|
||||
case VEHICLE_STATUS_ARRIVING:
|
||||
cable_lift_update_arriving(vehicle);
|
||||
cable_lift_update_arriving(this);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
|
|
@ -15,7 +15,6 @@
|
|||
|
||||
Vehicle* cable_lift_segment_create(
|
||||
Ride& ride, int32_t x, int32_t y, int32_t z, int32_t direction, uint16_t var_44, int32_t remaining_distance, bool head);
|
||||
void cable_lift_update(Vehicle* vehicle);
|
||||
int32_t cable_lift_update_track_motion(Vehicle* cableLift);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1966,7 +1966,7 @@ void Vehicle::Update()
|
|||
// The cable lift uses the ride type of NULL
|
||||
if (ride_subtype == RIDE_TYPE_NULL)
|
||||
{
|
||||
cable_lift_update(this);
|
||||
CableLiftUpdate();
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -307,6 +307,7 @@ private:
|
|||
bool SoundCanPlay() const;
|
||||
uint16_t GetSoundPriority() const;
|
||||
rct_vehicle_sound_params CreateSoundParam(uint16_t priority) const;
|
||||
void CableLiftUpdate();
|
||||
};
|
||||
|
||||
struct train_ref
|
||||
|
|
Loading…
Reference in New Issue