Skip to content

Commit

Permalink
Project2DFX v2.995
Browse files Browse the repository at this point in the history
  • Loading branch information
ThirteenAG committed Apr 10, 2015
1 parent 4b5d7dc commit a00c1d5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
11 changes: 7 additions & 4 deletions IIILodLights/dllmain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ void __declspec(naked) CLODLightManager::III::GenericIDEHook()
}
if (bPreloadLODs)
{
if (modelID == 404 || modelID == 405 || modelID == 416 || modelID == 402 || modelID == 403 || modelID == 1177 || modelID == 1179)
if (modelID == 404 || modelID == 405 || modelID == 416 || modelID == 402 || modelID == 403)
{
if (IDEDrawDistance == 3000)
{
Expand Down Expand Up @@ -435,12 +435,15 @@ BOOL APIENTRY DllMain(HMODULE /*hModule*/, DWORD reason, LPVOID /*lpReserved*/)
injector::MakeCALL(0x48C09F, CLODLightManager::III::Init);

CIniReader iniReader("");
if (iniReader.ReadInteger("DistanceLimits", "PreloadLODs", 0) == 1)
if (bPreloadLODs = iniReader.ReadInteger("DistanceLimits", "PreloadLODs", 0) == 1)
{
injector::WriteMemory(0x591E0B, &nLevelPortland, true);
/*injector::WriteMemory(0x591E0B, &nLevelPortland, true);
injector::WriteMemory(0x591E16, &nLevelPortland, true);
injector::WriteMemory(0x591E28, &nLevelPortland, true);
injector::WriteMemory(0x591E3B, &nLevelPortland, true);
injector::WriteMemory(0x591E3B, &nLevelPortland, true);*/

injector::WriteMemory<unsigned char>(0x40A6E6, 0xBD, true); //mov ebp
injector::WriteMemory(0x40A6E6 + 0x1, nLevelPortland, true);

injector::WriteMemory(0x4A8F79 + 0x1, &nLevelPortland, true);

Expand Down
2 changes: 2 additions & 0 deletions VCLodLights/dllmain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -471,6 +471,8 @@ BOOL APIENTRY DllMain(HMODULE /*hModule*/, DWORD reason, LPVOID /*lpReserved*/)
{
injector::WriteMemory(0x4DE4A7, nLevelPortland, true);

injector::WriteMemory(0x4C8C31 + 0x1, &nLevelPortland, true);

injector::MakeInline<0x40EEB8, 0x40EEB8 + 5>([](injector::reg_pack& regs)
{ });

Expand Down

0 comments on commit a00c1d5

Please sign in to comment.