Skip to content

Commit

Permalink
Support v1.0.1290.1 and older than v1.0.372.2
Browse files Browse the repository at this point in the history
  • Loading branch information
kagikn committed Dec 22, 2017
1 parent fd744e3 commit 4dca9d9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion StuntBonusV/Extensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}

Expand Down
1 change: 1 addition & 0 deletions StuntBonusV/StuntBonusV.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
</ItemGroup>
<ItemGroup>
<Compile Include="Extensions.cs" />
<Compile Include="MemoryAccess.cs" />
<Compile Include="Setting\Setting.cs" />
<Compile Include="Setting\SettingLoader.cs" />
<Compile Include="StuntBonusMonitor\InsaneStuntBonus.cs" />
Expand Down

0 comments on commit 4dca9d9

Please sign in to comment.