From b9f47539a8756da890083db167ece90753dcac88 Mon Sep 17 00:00:00 2001 From: Vortrex <3858226+VortrexFTW@users.noreply.github.com> Date: Wed, 22 Feb 2023 16:27:13 -0600 Subject: [PATCH] Fixes for interior scene change --- scripts/server/utilities.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/scripts/server/utilities.js b/scripts/server/utilities.js index 97a3fb22..853d0334 100644 --- a/scripts/server/utilities.js +++ b/scripts/server/utilities.js @@ -565,6 +565,14 @@ function processPlayerEnteringExitingProperty(client) { fadePlayerCamera(client, true, 1000); } updateInteriorLightsForPlayer(client, propertyData.interiorLights); + + let radioStationIndex = propertyData.streamingRadioStationIndex; + if (radioStationIndex != -1) { + if (getRadioStationData(radioStationIndex)) { + playRadioStreamForPlayer(client, getRadioStationData(radioStationIndex).url); + getPlayerData(client).streamingRadioStation = radioStationIndex; + } + } }, 1000); if (getPlayerData(client).enteringExitingProperty[0] == V_PROPERTY_TYPE_BUSINESS) { @@ -573,14 +581,6 @@ function processPlayerEnteringExitingProperty(client) { } } - let radioStationIndex = propertyData.streamingRadioStationIndex; - if (radioStationIndex != -1) { - if (getRadioStationData(radioStationIndex)) { - playRadioStreamForPlayer(client, getRadioStationData(radioStationIndex).url); - getPlayerData(client).streamingRadioStation = radioStationIndex; - } - } - getPlayerData(client).inProperty = [getPlayerData(client).enteringExitingProperty[0], getPlayerData(client).enteringExitingProperty[1]]; getPlayerData(client).enteringExitingProperty = null; getPlayerData(client).pedState = V_PEDSTATE_READY;