Skip to content

Commit 604c05e

Browse files
committed
internetradio: set local volume before sync timer
1 parent 95cdfd4 commit 604c05e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

[gameplay]/internetradio/logic/handle_radio/CHandleRadio.lua

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,10 @@ local function syncSpeakerVolume()
6464
end
6565

6666
local function requestSpeakerVolumeSync()
67+
local speakerVolume = getLocalSpeakerVolume()
68+
69+
setPlayerSpeakerVolume(localPlayer, speakerVolume) -- set volume locally so localPlayer could adjust it without any delay (this will be sanity corrected by server later on)
70+
6771
if (speakerVolumeSyncTimer) then
6872
resetTimer(speakerVolumeSyncTimer)
6973
else
@@ -72,10 +76,6 @@ local function requestSpeakerVolumeSync()
7276
speakerVolumeSyncTimer = setTimer(syncSpeakerVolume, speakerTimerInterval, 1)
7377
end
7478

75-
local speakerVolume = getLocalSpeakerVolume()
76-
77-
setPlayerSpeakerVolume(localPlayer, speakerVolume) -- set volume locally so localPlayer could adjust it without any delay (this will be sanity corrected by server later on)
78-
7979
return true
8080
end
8181

0 commit comments

Comments
 (0)