diff --git a/Fika.Core/Coop/Patches/GClass2013_method_0_Patch.cs b/Fika.Core/Coop/Patches/GClass2013_method_0_Patch.cs new file mode 100644 index 00000000..7d5adfcb --- /dev/null +++ b/Fika.Core/Coop/Patches/GClass2013_method_0_Patch.cs @@ -0,0 +1,24 @@ +using Fika.Core.Coop.Utils; +using SPT.Reflection.Patching; +using System.Reflection; + +namespace Fika.Core.Coop.Patches +{ + internal class GClass2013_method_0_Patch : ModulePatch + { + protected override MethodBase GetTargetMethod() + { + return typeof(GClass2013).GetMethod(nameof(GClass2013.method_0)); + } + + [PatchPrefix] + public static void Prefix(ref GStruct238 preset) + { + if (FikaBackendUtils.IsClient) + { + Logger.LogInfo("Disabling server scenes"); + preset.DisableServerScenes = true; + } + } + } +} diff --git a/Fika.Core/FikaPlugin.cs b/Fika.Core/FikaPlugin.cs index 359a9bfe..685edc33 100644 --- a/Fika.Core/FikaPlugin.cs +++ b/Fika.Core/FikaPlugin.cs @@ -340,6 +340,7 @@ private static void EnableFikaPatches() new TransitControllerAbstractClass_Exist_Patch().Enable(); new BotReload_method_1_Patch().Enable(); new Class1374_ReloadBackendLocale_Patch().Enable(); + new GClass2013_method_0_Patch().Enable(); #if DEBUG TasksExtensions_HandleFinishedTask_Patches.Enable(); new GClass1640_method_0_Patch().Enable();