mirror of
https://github.com/NuclearPowered/Reactor.git
synced 2026-10-20 01:46:21 +00:00
Fix freeplay
This commit is contained in:
2 files changed
+8
-2
No files matched your search
@@ -158,7 +158,7 @@ namespace Reactor.Networking.Patches
|
|||||||
{
|
{
|
||||||
ModList.Update();
|
ModList.Update();
|
||||||
|
|
||||||
var handshake = MessageWriter.Get(SendOption.Reliable);
|
var handshake = new MessageWriter(1000);
|
||||||
|
|
||||||
handshake.Write(__result);
|
handshake.Write(__result);
|
||||||
|
|
||||||
@@ -167,7 +167,7 @@ namespace Reactor.Networking.Patches
|
|||||||
ModList.Current!.Count
|
ModList.Current!.Count
|
||||||
);
|
);
|
||||||
|
|
||||||
__result = handshake.ToByteArray(false);
|
__result = handshake.ToByteArray(true);
|
||||||
handshake.Recycle();
|
handshake.Recycle();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,6 +15,12 @@ namespace Reactor.Patches
|
|||||||
{
|
{
|
||||||
public static void Prefix(ref bool useDtlsLayout)
|
public static void Prefix(ref bool useDtlsLayout)
|
||||||
{
|
{
|
||||||
|
if (AmongUsClient.Instance.GameMode != GameModes.OnlineGame)
|
||||||
|
{
|
||||||
|
useDtlsLayout = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
var serverManager = ServerManager.Instance;
|
var serverManager = ServerManager.Instance;
|
||||||
if (!serverManager || serverManager.CurrentRegion?.TryCast<DnsRegionInfo>() is not { } regionInfo || !regionInfo.Fqdn.EndsWith("among.us"))
|
if (!serverManager || serverManager.CurrentRegion?.TryCast<DnsRegionInfo>() is not { } regionInfo || !regionInfo.Fqdn.EndsWith("among.us"))
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in new issue
Block a user