mirror of
https://github.com/CookiePLMonster/SilentPatch.git
synced 2024-11-22 05:22:32 +01:00
SA: Clean CVehicleModelInfo fields from ::Init so they are cleaned up after modloader loads the ASI
Fixes #44
This commit is contained in:
parent
4cb6edad7c
commit
f1d85b825b
@ -1167,10 +1167,10 @@ void DrawScriptSpritesAndRectangles( uint8_t arg )
|
|||||||
bool ReadDoubleRearWheels(const wchar_t* pPath);
|
bool ReadDoubleRearWheels(const wchar_t* pPath);
|
||||||
bool __stdcall CheckDoubleRWheelsList( void* modelInfo, uint8_t* handlingData );
|
bool __stdcall CheckDoubleRWheelsList( void* modelInfo, uint8_t* handlingData );
|
||||||
|
|
||||||
CVehicleModelInfo* (__thiscall *orgVehicleModelInfoCtor)(CVehicleModelInfo*);
|
CVehicleModelInfo* (__thiscall *orgVehicleModelInfoInit)(CVehicleModelInfo*);
|
||||||
CVehicleModelInfo* __fastcall VehicleModelInfoCtor(CVehicleModelInfo* me)
|
CVehicleModelInfo* __fastcall VehicleModelInfoInit(CVehicleModelInfo* me)
|
||||||
{
|
{
|
||||||
orgVehicleModelInfoCtor(me);
|
orgVehicleModelInfoInit(me);
|
||||||
|
|
||||||
// Hack to satisfy some null checks
|
// Hack to satisfy some null checks
|
||||||
static uintptr_t DUMMY;
|
static uintptr_t DUMMY;
|
||||||
@ -5604,9 +5604,7 @@ void Patch_SA_10(HINSTANCE hInstance)
|
|||||||
|
|
||||||
|
|
||||||
// Properly initialize all CVehicleModelInfo fields
|
// Properly initialize all CVehicleModelInfo fields
|
||||||
ReadCall( 0x4C75E4, orgVehicleModelInfoCtor );
|
InterceptCall(0x4C7633, orgVehicleModelInfoInit, VehicleModelInfoInit);
|
||||||
InjectHook( 0x4C75E4, VehicleModelInfoCtor );
|
|
||||||
|
|
||||||
|
|
||||||
// Animated Phoenix hood scoop
|
// Animated Phoenix hood scoop
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user