Fix playSplashSound flag bug (#25992)

Co-authored-by: Gymnasiast <Gymnasiast@users.noreply.github.com>
This commit is contained in:
matheusvb3andGymnasiast authored and GitHub committed 2026-02-16 23:47:02 +01:00
1 parent f9756b988f
commit c11ac55bbc
1 file changed
+16 -13
+16 -13
View File
@@ -371,24 +371,27 @@ void Vehicle::UpdateHandleWaterSplash() const
const auto* rideEntry = GetRideEntry();
auto trackType = GetTrackType();
if (!rideEntry->flags.has(RideEntryFlag::playSplashSound) && rideEntry->flags.has(RideEntryFlag::playSplashSoundSlide))
if (!rideEntry->flags.has(RideEntryFlag::playSplashSound))
{
if (IsHead())
if (rideEntry->flags.has(RideEntryFlag::playSplashSoundSlide))
{
if (IsOnCoveredTrack())
if (IsHead())
{
Vehicle* nextVehicle = getGameState().entities.GetEntity<Vehicle>(next_vehicle_on_ride);
if (nextVehicle == nullptr)
return;
Vehicle* nextNextVehicle = getGameState().entities.GetEntity<Vehicle>(nextVehicle->next_vehicle_on_ride);
if (nextNextVehicle == nullptr)
return;
if (!nextNextVehicle->IsOnCoveredTrack())
if (IsOnCoveredTrack())
{
if (track_progress == 4)
Vehicle* nextVehicle = getGameState().entities.GetEntity<Vehicle>(next_vehicle_on_ride);
if (nextVehicle == nullptr)
return;
Vehicle* nextNextVehicle = getGameState().entities.GetEntity<Vehicle>(nextVehicle->next_vehicle_on_ride);
if (nextNextVehicle == nullptr)
return;
if (!nextNextVehicle->IsOnCoveredTrack())
{
vehicle_update_play_water_splash_sound();
if (track_progress == 4)
{
vehicle_update_play_water_splash_sound();
}
}
}
}