1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2025-12-23 15:52:55 +01:00

Fix #10914: Missing sounds, including guest purchase sound (#10948)

Regression from 09fad0ef7f (part of #10854).
This commit is contained in:
Aaron van Geffen
2020-03-16 22:51:32 +01:00
committed by GitHub
parent 9fda7762e5
commit dbeef78778

View File

@@ -218,8 +218,8 @@ static AudioParams audio_get_params_from_location(SoundId soundId, const CoordsX
{
if (viewport->flags & VIEWPORT_FLAG_SOUND_ON)
{
int16_t vy = pos2.y - viewport->viewPos.x;
int16_t vx = pos2.x - viewport->viewPos.y;
int16_t vx = pos2.x - viewport->viewPos.x;
int16_t vy = pos2.y - viewport->viewPos.y;
params.pan = viewport->pos.x + (vx >> viewport->zoom);
params.volume = SoundVolumeAdjust[static_cast<uint8_t>(soundId)]
+ ((-1024 * viewport->zoom - 1) * (1 << volumeDown)) + 1;