altmp / altv-issues

Issues and roadmap for alt:V project
93 stars 17 forks source link

Voice chat position sync doesn't properly work in clientside loaded interiors #825

Closed Kaev closed 2 years ago

Kaev commented 3 years ago

Client/server version

3.0-dev 5

Current behavior The position of the player voice sometimes stops following the player in clientside loaded IPLs (non modded, GTA V original IPLs so not related to interior proxies). Usually happens when you switch rooms.

Expected behavior The voice of the player should always be at the players position.

Steps to reproduce

Context (environment) We try to use the AltV voice chat and talk in clientside loaded interiors.

Possible solution @vadzz-dev said in discord that the problem might be related to the room portals. The voice position probably stucks at the portals instead of following the player.

Lawliz commented 3 years ago

I've done something like this to solve temporary this issue but sometimes it doesn't work:

everyTick(async () => {
    if (voiceLoaded === true && Player.local.isTalking === true) {
        const interior = getInteriorFromEntity(Player.local.scriptID)
        if (interior !== lastInterior) {
            lastInterior = interior
            emitServer('voice:muteSelf')
            await wait(500)
            emitServer('voice:unmuteSelf')
        }
    }
})

You've to wait ~500ms to unmute the player otherwise the voice is still stucked at the door. And I face the same issue when going under tunnel or parkings on 2.23 (release).

C0kkie commented 3 years ago

Can you try the latest dev build? It should be fixed there

Lawliz commented 3 years ago

Can't test it right now, if you want to test it you'll need to be with another person.

One need a soundpad with a sound playing with his input and both need to enter in the interior, if the sound stay at the door of the interior then it's not fixed.

You can try it in tunnel to, if I remember well there's the same problem with them.

C0kkie commented 3 years ago

Will be fixed in next rc build, but the rever, muffling will be broken for now

C0kkie commented 2 years ago

Should be fixed