diff --git a/SkinHide/Patches/PlayerPatch.cs b/SkinHide/Patches/PlayerPatch.cs index 1e39087..11788eb 100644 --- a/SkinHide/Patches/PlayerPatch.cs +++ b/SkinHide/Patches/PlayerPatch.cs @@ -1,5 +1,6 @@ using Aki.Reflection.Patching; using Aki.Reflection.Utils; +using System; using System.Reflection; using System.Threading.Tasks; using Comfort.Common; @@ -9,7 +10,7 @@ namespace SkinHide.Patches { public class PlayerPatch : ModulePatch { - private static readonly bool Is231Up; + private static readonly bool Is231Up = SkinHidePlugin.GameVersion > new Version("0.12.12.17349"); static PlayerPatch() { diff --git a/SkinHide/SkinHidePlugin.cs b/SkinHide/SkinHidePlugin.cs index 8be73ed..a870569 100644 --- a/SkinHide/SkinHidePlugin.cs +++ b/SkinHide/SkinHidePlugin.cs @@ -7,6 +7,8 @@ using EFT; using EFT.Visual; using SkinHide.Patches; using SkinHide.Utils; +using System.Diagnostics; +using System; namespace SkinHide { @@ -29,6 +31,16 @@ namespace SkinHide private bool BotHideCache; + public static Version GameVersion + { + get + { + FileVersionInfo exeInfo = Process.GetCurrentProcess().MainModule.FileVersionInfo; + + return new Version(exeInfo.FileMajorPart, exeInfo.ProductMinorPart, exeInfo.ProductBuildPart, exeInfo.FilePrivatePart); + } + } + public enum Part { All,