v10networkscom / saltychat-docs

Documentation for Salty Chat (TeamSpeak 3 based Voice Plugin)
https://gaming.v10networks.com
15 stars 22 forks source link

Feature-Request: Muffling by interior room #3

Closed 5pHiNxX closed 4 years ago

5pHiNxX commented 4 years ago

Add the possibility to muffle the sound of people in other rooms. The idea is to introduce a new parameter like RoomID and only people with the same RoomID can hear each other clearly.

A additional great feature would be a second parameter, maybe IsDoorOpen of type boolean, that can be set to override the room-muffling. Like if the door to the neighbor room is open and thus the sound should behave as if they were in the same room.

I'm thinking of something like this:

https://streamable.com/wj5rl

BlackFlash5 commented 4 years ago

Why would implement such a feature with a RoomId, if it's just a flag (true/false)? And how would you implement that ingame?

I already thought of that, but couldn't come up with a satisfying solution. My plan was to check LOS, but that would lead into issues if e.g. a small object is between the players. https://runtime.fivem.net/doc/natives/#_0xFCDFF7B72D23A1AC

5pHiNxX commented 4 years ago

For the implementation in the game I would use this native: https://natives.altv.mp/#/0x47C2A06D4F5F424B

It returns the hash of the room the entity (here the player) is in...

And a flag would do the job, you're right.

BlackFlash5 commented 4 years ago

Oh neat! So you can check if the room is the same and when it's not, you could check LOS - for your door example.

5pHiNxX commented 4 years ago

Exactly

BlackFlash5 commented 4 years ago

Implemented that feature in 0.5.0. Can you play a bit around with it and provide some feedback, so we can improve it and push it to the stable branch?

younesdev123 commented 4 years ago

I have this with Salty: https://www.youtube.com/watch?v=eGmocsEzOGc

BlackFlash5 commented 4 years ago

Since there was no real feedback > closed