mirror of
https://github.com/NuclearPowered/Reactor.git
synced 2026-10-20 01:46:21 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bbcb1abb67 | ||
|
|
9b1211f505 |
@@ -154,6 +154,15 @@ namespace Reactor.Networking.Patches
|
||||
[HarmonyPatch(typeof(InnerNetClient), nameof(InnerNetClient.GetConnectionData))]
|
||||
public static class HandshakePatch
|
||||
{
|
||||
public static void Prefix(ref bool useDtlsLayout)
|
||||
{
|
||||
// Due to reasons currently unknown, the useDtlsLayout parameter sometimes doesn't reflect whether DTLS
|
||||
// is actually supposed to be enabled. This causes a bad handshake message and a quick disconnect.
|
||||
// The field on AmongUsClient appears to be more reliable, so override this parameter with what it is supposed to be.
|
||||
Logger<ReactorPlugin>.Info($"Currently using dtls: {useDtlsLayout}. Should use dtls: {AmongUsClient.Instance.useDtls}");
|
||||
useDtlsLayout = AmongUsClient.Instance.useDtls;
|
||||
}
|
||||
|
||||
public static void Postfix(ref Il2CppStructArray<byte> __result)
|
||||
{
|
||||
ModList.Update();
|
||||
|
||||
Reference in new issue
Block a user