Skip to content

Commit 5ecf308

Browse files
committed
Update Body.cpp
1 parent bb904ce commit 5ecf308

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

src/Ext/Rules/Body.cpp

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -687,3 +687,18 @@ DEFINE_HOOK(0x6744E4, RulesClass_ReadJumpjetControls_Extra, 0x7)
687687

688688
// skip vanilla JumpjetControls and make it earlier load
689689
// DEFINE_JUMP(LJMP, 0x668EB5, 0x668EBD); // RulesClass_Process_SkipJumpjetControls // Really necessary? won't hurt to read again
690+
691+
// After rulesmd.ini has been parsed, before anything else like maps and only once on game init.
692+
DEFINE_HOOK(0x6876B1, ReadScenarioINI_Optimizations, 0x5)
693+
{
694+
auto const pRulesExt = RulesExt::Global();
695+
696+
if (!pRulesExt->BalloonHoverPathingFix)
697+
{
698+
Patch::Apply_RAW(0x51BFA2, { 0x85, 0x99, 0x40, 0x01, 0x00, 0x00 });
699+
Patch::Apply_RAW(0x73F0A7, { 0x8B, 0xD9, 0x8B, 0x8C, 0x24, 0x88, 0x00, 0x00, 0x00 });
700+
Patch::Apply_RAW(0x4D5690, { 0x55, 0x8B, 0xEC, 0x83, 0xE4, 0xF8 });
701+
}
702+
703+
return 0;
704+
}

0 commit comments

Comments
 (0)