notgoodusename / OsirisAndExtra

Other
127 stars 64 forks source link

fix lag with chocking packets when voice chat is active (cant make pr on phone) #465

Open Wolfyyta opened 1 year ago

Wolfyyta commented 1 year ago

fix for the voice sounds

bool __fastcall send_net_channel(INetChannel* thisptr, int edx, INetMessage* message, bool force_reliable, bool voice)
{
    // check for voicedata group and enable voice streams
    if (message->get_group() == INetChannelInfo::VOICE)
        voice = true;

        // call og
    return og::net_channel(thisptr, edx, message, force_reliable, voice);
}
Wolfyyta commented 1 year ago

99% sure jannes will comment first on this

Xsintashi commented 1 year ago

99% sure jannes will comment first on this

u could not mention that

JannesBonk commented 1 year ago

99% sure jannes will comment first on this

ong cap

JannesBonk commented 1 year ago

bool __fastcall send_net_channel(INetChannel thisptr, int edx, INetMessage message, bool force_reliable, bool voice) { // check for voicedata group and enable voice streams if (message->get_group() == INetChannelInfo::VOICE) voice = true;

    // call og

return og::net_channel(thisptr, edx, message, force_reliable, voice); }

Wolfyyta commented 1 year ago

bool __fastcall send_net_channel(INetChannel thisptr, int edx, INetMessage message, bool force_reliable, bool voice) { // check for voicedata group and enable voice streams if (message->get_group() == INetChannelInfo::VOICE) voice = true;

    // call og

return og::net_channel(thisptr, edx, message, force_reliable, voice); }

  • this isnt even in osiris

stolen from public source but gets it done x)

JannesBonk commented 1 year ago

bool __fastcall send_net_channel(INetChannel thisptr, int edx, INetMessage message, bool force_reliable, bool voice) { // check for voicedata group and enable voice streams if (message->get_group() == INetChannelInfo::VOICE) voice = true;

    // call og

return og::net_channel(thisptr, edx, message, force_reliable, voice); }

  • this isnt even in osiris

stolen from public source but gets it done x)

ill find a way to add it to my pasta $$$

Wolfyyta commented 1 year ago

forgot to let the enum for this one x) VOICE is at index 9 in the enum, here's the full:

    enum
    {
        GENERIC = 0,    // must be first and is default group
        LOCALPLAYER,    // bytes for local player entity update
        OTHERPLAYERS,   // bytes for other players update
        ENTITIES,       // all other entity bytes
        SOUNDS,         // game sounds
        EVENTS,         // event messages
        TEMPENTS,       // temp entities
        USERMESSAGES,   // user messages
        ENTMESSAGES,    // entity messages
        VOICE,          // voice data
        STRINGTABLE,    // a stringtable update
        MOVE,           // client move cmds
        STRINGCMD,      // string command
        SIGNON,         // various signondata
        PAINTMAP,       // paintmap data
        ENCRYPTED,      // encrypted data
        TOTAL,          // must be last and is not a real group
    };
JannesBonk commented 1 year ago

bool __fastcall send_net_channel(INetChannel thisptr, int edx, INetMessage message, bool force_reliable, bool voice) { // check for voicedata group and enable voice streams if (message->get_group() == INetChannelInfo::VOICE) voice = true;

    // call og

return og::net_channel(thisptr, edx, message, force_reliable, voice); }

i found a much simpler solution

Smellon69 commented 1 year ago

then share with the class :D

JannesBonk commented 1 year ago

then share with the class :D

alr published by @Xsintashi