diff --git a/OTAPI.Patcher/OTAPI.Patcher.csproj b/OTAPI.Patcher/OTAPI.Patcher.csproj index dd32e0df..a79c5601 100644 --- a/OTAPI.Patcher/OTAPI.Patcher.csproj +++ b/OTAPI.Patcher/OTAPI.Patcher.csproj @@ -1,13 +1,13 @@ - + Exe net9.0 - 3.3.14 + 3.3.15 true win;osx;linux; enable - Terraria 1.4.5.8 on .NET9 + Terraria 1.4.6.0 on .NET9 diff --git a/OTAPI.Patcher/Resolvers/PCFileResolver.cs b/OTAPI.Patcher/Resolvers/PCFileResolver.cs index 86965fae..0ab661e4 100644 --- a/OTAPI.Patcher/Resolvers/PCFileResolver.cs +++ b/OTAPI.Patcher/Resolvers/PCFileResolver.cs @@ -1,4 +1,4 @@ -/* +/* Copyright (C) 2020 DeathCradle This file is part of Open Terraria API v3 (OTAPI) @@ -28,7 +28,7 @@ public class PCFileResolver : IFileResolver { public const String TerrariaWebsite = "https://terraria.org"; - public virtual string SupportedDownloadUrl { get; } = $"{TerrariaWebsite}/api/download/pc-dedicated-server/terraria-server-1458.zip"; + public virtual string SupportedDownloadUrl { get; } = $"{TerrariaWebsite}/api/download/pc-dedicated-server/terraria-server-146.zip"; public virtual string GetUrlFromHttpResponse(string content) { diff --git a/OTAPI.Scripts/Mods/PatchNetplayBroadcast.Server.cs b/OTAPI.Scripts/Mods/PatchNetplayBroadcast.Server.cs index 1b3e45cc..9de16f63 100644 --- a/OTAPI.Scripts/Mods/PatchNetplayBroadcast.Server.cs +++ b/OTAPI.Scripts/Mods/PatchNetplayBroadcast.Server.cs @@ -1,4 +1,4 @@ -/* +/* Copyright (C) 2020 DeathCradle This file is part of Open Terraria API v3 (OTAPI) @@ -43,7 +43,7 @@ void PatchNetplayBroadcast(MonoModder modder) i => i.OpCode == OpCodes.Call && i.Operand is MethodReference methodReference && methodReference.Name == "Sleep" - && i.Next.OpCode == OpCodes.Br_S + && (i.Next.OpCode == OpCodes.Br_S || i.Next.OpCode == OpCodes.Br) ); BroadcastThread.Index++; diff --git a/OTAPI.Scripts/Patches/Terraria.WindowsLaunch.Server.cs b/OTAPI.Scripts/Patches/Terraria.WindowsLaunch.Server.cs index 4de76d86..54250e80 100644 --- a/OTAPI.Scripts/Patches/Terraria.WindowsLaunch.Server.cs +++ b/OTAPI.Scripts/Patches/Terraria.WindowsLaunch.Server.cs @@ -1,4 +1,4 @@ -/* +/* Copyright (C) 2020 DeathCradle This file is part of Open Terraria API v3 (OTAPI) @@ -18,12 +18,12 @@ You should have received a copy of the GNU General Public License */ #pragma warning disable CS0626 // Method, operator, or accessor is marked external and has no attributes on it -#if !tModLoader_V1_4 +#if !tModLoader_V1_4 using System.Runtime.InteropServices; -/// -/// @doc Improves cross platform launch checks and add extra launch features -/// +/// +/// @doc Improves cross platform launch checks and add extra launch features +/// namespace Terraria { class patch_WindowsLaunch @@ -38,6 +38,15 @@ public static bool SetConsoleCtrlHandler(WindowsLaunch.HandlerRoutine handler, b return false; } + public static extern void orig_Preload(string nativeLibName); + public static void Preload(string nativeLibName) + { + if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) + { + orig_Preload(nativeLibName); + } + } + ///// ///// Allows consumers to override the clrjit resolution (if applied) /////