Skip to content

Commit ee9b3fb

Browse files
authored
SCPT: Increase draw distance for physics plants (#2240)
1 parent 198270b commit ee9b3fb

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

  • source/SplinterCellPandoraTomorrow.WidescreenFix

source/SplinterCellPandoraTomorrow.WidescreenFix/Engine.ixx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,11 @@ namespace AEGrassActor
358358
}
359359
}
360360

361+
namespace FLevelSceneNode
362+
{
363+
float fPlantFarDistance = 100000.0f;
364+
}
365+
361366
namespace AActor
362367
{
363368
SafetyHookInline shPostLoad = {};
@@ -823,6 +828,12 @@ export void InitEngine()
823828
GetProcAddress(GetModuleHandle(L"Engine"), "?PostLoad@AActor@@UAEXXZ"),
824829
AActor::PostLoad);
825830

831+
pattern = find_module_pattern(GetModuleHandle(L"Engine"), "FF 15 ? ? ? ? D9 5D 08 F3 0F 10 45 08 0F 2F 05 ? ? ? ? 0F 86");
832+
if (!pattern.empty())
833+
{
834+
injector::WriteMemory<uintptr_t>(pattern.get_first(17), reinterpret_cast<uintptr_t>(&FLevelSceneNode::fPlantFarDistance), true);
835+
}
836+
826837
// Fix thermal vision grain scaling at high resolutions
827838
pattern = find_module_pattern(GetModuleHandle(L"Engine"), "8B 46 04 8B 80 84 00 00 00 99 F7 F9 66 0F 6E C0");
828839
if (!pattern.empty())

0 commit comments

Comments
 (0)