1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-02-02 03:35:09 +01:00

Add UpdateRotating field to RTD

This commit is contained in:
frutiemax
2022-08-31 04:10:39 -04:00
committed by GitHub
parent 3799d2fc3d
commit 306cc65258
33 changed files with 60 additions and 9 deletions

View File

@@ -4830,6 +4830,24 @@ void Vehicle::UpdateSimulatorOperating()
var_C0 = 0;
}
void UpdateRotatingDefault(Vehicle& vehicle)
{
vehicle.sub_state = 1;
vehicle.UpdateRotating();
}
void UpdateRotatingEnterprise(Vehicle& vehicle)
{
if (vehicle.sub_state == 2)
{
vehicle.SetState(Vehicle::Status::Arriving);
vehicle.var_C0 = 0;
return;
}
UpdateRotatingDefault(vehicle);
}
/**
*
* rct2: 0x006D92FF
@@ -4910,15 +4928,8 @@ void Vehicle::UpdateRotating()
}
}
if (curRide->type == RIDE_TYPE_ENTERPRISE && sub_state == 2)
{
SetState(Vehicle::Status::Arriving);
var_C0 = 0;
return;
}
sub_state = 1;
UpdateRotating();
const auto& rtd = GetRideTypeDescriptor(curRide->type);
rtd.UpdateRotating(*this);
}
/**