mirror of https://github.com/OpenRCT2/OpenRCT2.git
Part of #9473: Create Vehicle::NumPeepsUntilTrainTail
Converted from vehicle_get_total_num_peeps
This commit is contained in:
parent
421fc5bc59
commit
4d7ad5f92b
|
@ -3593,7 +3593,7 @@ void Vehicle::UpdateCrashSetup()
|
|||
}
|
||||
SetState(VEHICLE_STATUS_CRASHING, sub_state);
|
||||
|
||||
if (vehicle_get_total_num_peeps(this) != 0)
|
||||
if (NumPeepsUntilTrainTail() != 0)
|
||||
{
|
||||
audio_play_sound_at_location(SoundId::HauntedHouseScream2, { x, y, z });
|
||||
}
|
||||
|
@ -5572,7 +5572,7 @@ SoundId Vehicle::UpdateScreamSound()
|
|||
|
||||
rct_ride_entry_vehicle* vehicleEntry = &rideEntry->vehicles[vehicle_type];
|
||||
|
||||
int32_t totalNumPeeps = vehicle_get_total_num_peeps(this);
|
||||
int32_t totalNumPeeps = NumPeepsUntilTrainTail();
|
||||
if (totalNumPeeps == 0)
|
||||
return SoundId::Null;
|
||||
|
||||
|
@ -9785,8 +9785,9 @@ rct_ride_entry_vehicle* Vehicle::Entry() const
|
|||
return &rideEntry->vehicles[vehicle_type];
|
||||
}
|
||||
|
||||
int32_t vehicle_get_total_num_peeps(const Vehicle* vehicle)
|
||||
int32_t Vehicle::NumPeepsUntilTrainTail() const
|
||||
{
|
||||
const Vehicle* vehicle = this;
|
||||
uint16_t spriteIndex;
|
||||
int32_t numPeeps = 0;
|
||||
for (;;)
|
||||
|
|
|
@ -360,6 +360,7 @@ private:
|
|||
bool CurrentTowerElementIsTop();
|
||||
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);
|
||||
int32_t NumPeepsUntilTrainTail() const;
|
||||
void InvalidateWindow();
|
||||
void TestReset();
|
||||
void UpdateTestFinish();
|
||||
|
@ -562,7 +563,6 @@ void vehicle_sounds_update();
|
|||
GForces vehicle_get_g_forces(const Vehicle* vehicle);
|
||||
void vehicle_set_map_toolbar(const Vehicle* vehicle);
|
||||
int32_t vehicle_is_used_in_pairs(const Vehicle* vehicle);
|
||||
int32_t vehicle_get_total_num_peeps(const Vehicle* vehicle);
|
||||
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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue