forked from zombieb/undead-universal-patch-il2cpp
UpdatePhotonThrottling only runs when using Photon over UDP, is disabled for TCP.
Added Photon server config documentation
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using HarmonyLib;
|
||||
using Mapster;
|
||||
using undead_universal_patch_il2cpp.Core;
|
||||
using undead_universal_patch_il2cpp.Core.Config;
|
||||
using undead_universal_patch_il2cpp.Core.Content.CustomRecNet.CustomPhoton;
|
||||
@@ -101,7 +103,12 @@ public class PhotonThrottlingPatch
|
||||
"UpdatePhotonThrottling"
|
||||
);
|
||||
|
||||
static bool Prepare() => patchTypesResult.Success;
|
||||
static bool Prepare()
|
||||
{
|
||||
if (PhotonConfig.ConnectionProtocol.Value == 1) return patchTypesResult.Success;
|
||||
else return false;
|
||||
}
|
||||
|
||||
static MethodBase TargetMethod() => patchTypesResult.Method;
|
||||
|
||||
static bool Prefix() => PhotonConfig.ConnectionProtocol.Value != 1;
|
||||
|
||||
Reference in New Issue
Block a user