mirror of
https://github.com/DorkSquadRR/DorkNet.git
synced 2026-10-25 23:18:44 -07:00
80cc4ce0bd
The harmony hook on PhotonNetwork.ConnectUsingSettings registers in March's IL2CPP build but never actually fires — the watch's connect path goes through a different (mangled) entry point. Log confirms [patch-ok] PhotonNetwork.ConnectUsingSettings but no [photon-appid] override line, ever. Fix moves the override out of the prefix-only path: - New PhotonPatches.TryApplyOverride(reason) does the PhotonServerSettings.AppID / VoiceAppID / region mutation and flips an OverrideApplied flag once it succeeds. Idempotent. - OnUpdate polls TryApplyOverride every 6th frame (~10 Hz) until it succeeds, then stops. The "type not found yet" log is throttled to once on first miss + every 300th miss after, so the file doesn't drown if PhotonServerSettings stays unloaded. - Mod.ResolveType made internal (was private) so PhotonPatches + SavePatches can use the broader assembly-scan fallback — the local FindGameType copies were too narrow and missed IL2CPP-mangled type names. Both FindGameType helpers collapse to one-line delegates to Mod.ResolveType. - Prefix on ConnectUsingSettings kept as a belt-and-braces hook (passes reason="prefix"); harmless if it fires, fine if it doesn't.