Skip to content

Commit

Permalink
Merge pull request #29 from ermaccer/master
Browse files Browse the repository at this point in the history
Reverse lights fix
  • Loading branch information
ThirteenAG authored Jan 21, 2021
2 parents 4ca2231 + 288d74d commit 45beca5
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion source/dllmain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,12 @@ void Init()

static float& fTimeStep = **hook::get_pattern<float*>("F3 0F 10 05 ? ? ? ? F3 0F 59 05 ? ? ? ? 8B 43 20 53", 4);

// reverse lights fix
{
auto pattern = hook::pattern("8B 40 64 FF D0 F3 0F 10 40 ? 8D 44 24 40 50");
injector::WriteMemory<uint8_t>(pattern.get_first(2), 0x60, true);
}

//fix for lods appearing inside normal models, unless the graphics menu was opened once (draw distances aren't set properly?)
{
auto pattern = hook::pattern("E8 ? ? ? ? 8D 4C 24 10 F3 0F 11 05 ? ? ? ? E8 ? ? ? ? 8B F0 E8 ? ? ? ? DF 2D");
Expand Down Expand Up @@ -571,4 +577,4 @@ BOOL APIENTRY DllMain(HMODULE hModule, DWORD reason, LPVOID lpReserved)
if (!IsUALPresent()) { InitializeASI(); }
}
return TRUE;
}
}

0 comments on commit 45beca5

Please sign in to comment.