From 4dca9d9f2c22630cfb8af7d626abde3f1e8897a3 Mon Sep 17 00:00:00 2001 From: kagikn Date: Fri, 22 Dec 2017 20:40:07 +0900 Subject: [PATCH] Support v1.0.1290.1 and older than v1.0.372.2 --- StuntBonusV/Extensions.cs | 4 +++- StuntBonusV/StuntBonusV.csproj | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/StuntBonusV/Extensions.cs b/StuntBonusV/Extensions.cs index 8c9b969..62e34b7 100644 --- a/StuntBonusV/Extensions.cs +++ b/StuntBonusV/Extensions.cs @@ -265,7 +265,9 @@ internal static bool IsWheelTouching(IntPtr wheelAddress) unsafe { - return (*((byte*)wheelAddress.ToPointer() + 0x1EC) & 0x1) != 0; + var offset = Game.Version >= GameVersion.VER_1_0_372_2_STEAM ? 0x1EC : 0x1DC; + offset = Game.Version >= GameVersion.VER_1_0_1290_1_STEAM ? 0x1E4 : offset; + return (*((byte*)wheelAddress.ToPointer() + offset) & 0x1) != 0; } } diff --git a/StuntBonusV/StuntBonusV.csproj b/StuntBonusV/StuntBonusV.csproj index b147926..f8f8361 100644 --- a/StuntBonusV/StuntBonusV.csproj +++ b/StuntBonusV/StuntBonusV.csproj @@ -71,6 +71,7 @@ +