File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -2001,6 +2001,34 @@ static void _declspec(naked) HOOK_FxSystemBP_c__Load()
2001
2001
}
2002
2002
}
2003
2003
2004
+ // ////////////////////////////////////////////////////////////////////////////////////////
2005
+ //
2006
+ // FxPrim_c::Enable
2007
+ //
2008
+ // Add a null-pointer check for the ecx object. This hook is a side-effect of the hook for
2009
+ // FxSystemBP_c::Load above.
2010
+ //
2011
+ // ////////////////////////////////////////////////////////////////////////////////////////
2012
+ // >>> 0x4A9F50 | 8A 44 24 04 | mov al, [esp+4]
2013
+ // >>> 0x4A9F54 | 88 41 0C | mov [ecx+0xC], al
2014
+ // >>> 0x4A9F57 | C2 04 00 | retn 4
2015
+ #define HOOKPOS_FxPrim_c__Enable 0x4A9F50
2016
+ #define HOOKSIZE_FxPrim_c__Enable 10
2017
+
2018
+ static void _declspec (naked) HOOK_FxPrim_c__Enable()
2019
+ {
2020
+ _asm
2021
+ {
2022
+ test ecx, ecx
2023
+ jz returnFromFunction
2024
+ mov al, [esp+4 ]
2025
+ mov [ecx+0xC ], al
2026
+
2027
+ returnFromFunction:
2028
+ retn 4
2029
+ }
2030
+ }
2031
+
2004
2032
// ////////////////////////////////////////////////////////////////////////////////////////
2005
2033
//
2006
2034
// Setup hooks for CrashFixHacks
@@ -2060,6 +2088,7 @@ void CMultiplayerSA::InitHooks_CrashFixHacks()
2060
2088
EZHookInstall (RpAnimBlendClumpGetFirstAssociation);
2061
2089
EZHookInstall (CAnimManager__BlendAnimation);
2062
2090
EZHookInstall (FxSystemBP_c__Load);
2091
+ EZHookInstall (FxPrim_c__Enable);
2063
2092
2064
2093
// Install train crossing crashfix (the temporary variable is required for the template logic)
2065
2094
void (*temp)() = HOOK_TrainCrossingBarrierCrashFix<RETURN_CObject_Destructor_TrainCrossing_Check, RETURN_CObject_Destructor_TrainCrossing_Invalid>;
You can’t perform that action at this time.
0 commit comments