UpdatePhotonThrottling only runs when using Photon over UDP, is disabled for TCP.

Added Photon server config documentation
This commit is contained in:
2025-08-18 22:33:48 -04:00
parent 95078cf3b4
commit eeae720d56
5 changed files with 54 additions and 17 deletions

View File

@@ -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;