thehehe Can we now catch up on this one again? .....
as They reverted the P2P again , to just like it was at legacy ( i guess)
so handling over the server...
Should be possible now riiight?
Sending a voice packet to clients?
Discussion in 'Rust Development' started by Crushed, Dec 9, 2017.
-
Wulf Community Admin
-
Tried using Effect.client.Run but it didn't work :/ -
Wulf Community Admin
-
found this one here.
Code:public class PlayerVoiceSpeaker : EntityComponent<BasePlayer> { private float[] buffer; private uint bufferSize; [NonSerialized] public float currentVolume; private uint dataPosition; private uint dataReceived; private static MemoryStream decompressStream; private bool Initialized; private bool isPlaying; public AudioSource mouthSpeaker; private uint optimalRate; private uint playbackBuffer; private bool stopping; private float[] volumeData; internal float volumeVelocity; static PlayerVoiceSpeaker(); public PlayerVoiceSpeaker(); public void ClientFrame(BasePlayer player); private void InitializeSpeaker(); public bool IsSpeaking(); private void OnAudioRead(float[] data); private void OnDisable(); public void Receive(byte[] data); private bool ShouldReceiveVoice(); private void StartPlaying(); private void StopPlayback(); private void WriteToClip(float f); private void WriteToClip(byte[] uncompressed, int iSize); }
-
Voice can be on other BasePlayer (not LocalPlayer)
[DOUBLEPOST=1512857438][/DOUBLEPOST]Player Send Compressed data and player decompress clip
[DOUBLEPOST=1512857494][/DOUBLEPOST]We need access to steam compress methodLast edited by a moderator: Dec 9, 2017 -
found also under BaseEntity ->
Code:public virtual void OnVoiceData(byte[] data) { }