Skip to content

Commit

Permalink
force lod improvements (stop crashes)
Browse files Browse the repository at this point in the history
  • Loading branch information
szaaamerik committed Jan 13, 2024
1 parent f181d4b commit 6dc88b5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -279,9 +279,9 @@ private void ForceLodSwitch_OnToggled(object sender, RoutedEventArgs e)
return;
}

const string cmpOrig = "41 8B 8F 98070000";
const string cmpOrig = "41 0F10 B7 D0070000";
const string cmpDetoured = "51 48 8B 48 30 48 89 0D 06 00 00 00 59";
if (!LodCmpDetour.Setup(ForceLodSwitch, LodCmp, cmpOrig, cmpDetoured, 7, true, 0, true))
if (!LodCmpDetour.Setup(ForceLodSwitch, LodCmp, cmpOrig, cmpDetoured, 8, true, 0, true))
{
Detour.FailedHandler(sender, ForceLodSwitch_OnToggled);
return;
Expand Down
4 changes: 2 additions & 2 deletions Forza-Mods-AIO/Tabs/Self-Vehicle/Self-Vehicle-Addrs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -293,8 +293,8 @@ private static void FH5_Scan()
ForceLod = Mw.M.ScanForSig(forceLodSig).FirstOrDefault();
Sv.UiManager.AddProgress();

const string lodCmpSig = "41 8B ? ? ? ? ? 3B 48 ? 75";
LodCmp = Mw.M.ScanForSig(lodCmpSig).FirstOrDefault();
const string lodCmpSig = "45 32 ? 89 48";
LodCmp = Mw.M.ScanForSig(lodCmpSig).FirstOrDefault() + 6;
Sv.UiManager.AddProgress();

SelfVehicleOption.IsEnabled = true;
Expand Down

0 comments on commit 6dc88b5

Please sign in to comment.