mirror of
https://github.com/CookiePLMonster/SilentPatch.git
synced 2024-11-25 23:02:31 +01:00
Removed nasty ReadCall hacks
This commit is contained in:
parent
33c1ab4ace
commit
16a8b15086
@ -15,9 +15,7 @@ namespace Common {
|
||||
{
|
||||
auto addr = get_pattern( "83 3C 33 00 74 19 89 F9 E8", 8 );
|
||||
|
||||
void* pRestoreCar;
|
||||
ReadCall( addr, pRestoreCar );
|
||||
CStoredCar::orgRestoreCar = *(decltype(CStoredCar::orgRestoreCar)*)&pRestoreCar;
|
||||
ReadCall( addr, CStoredCar::orgRestoreCar );
|
||||
InjectHook( addr, &CStoredCar::RestoreCar_SilentPatch );
|
||||
}
|
||||
}
|
||||
|
@ -3514,9 +3514,7 @@ void Patch_SA_10()
|
||||
|
||||
// Fixed bomb ownership/bombs saving for bikes
|
||||
{
|
||||
void* pRestoreCar;
|
||||
ReadCall( 0x44856A, pRestoreCar );
|
||||
CStoredCar::orgRestoreCar = *(decltype(CStoredCar::orgRestoreCar)*)&pRestoreCar;
|
||||
ReadCall( 0x44856A, CStoredCar::orgRestoreCar );
|
||||
InjectHook( 0x44856A, &CStoredCar::RestoreCar_SilentPatch );
|
||||
InjectHook( 0x4485DB, &CStoredCar::RestoreCar_SilentPatch );
|
||||
}
|
||||
@ -3550,9 +3548,7 @@ void Patch_SA_10()
|
||||
|
||||
// Fixed ammo from SCM
|
||||
{
|
||||
void* pGiveWeapon;
|
||||
ReadCall( 0x47D335, pGiveWeapon );
|
||||
CPed::orgGiveWeapon = *(decltype(CPed::orgGiveWeapon)*)&pGiveWeapon;
|
||||
ReadCall( 0x47D335, CPed::orgGiveWeapon );
|
||||
InjectHook( 0x47D335, &CPed::GiveWeapon_SP );
|
||||
}
|
||||
|
||||
@ -3565,13 +3561,10 @@ void Patch_SA_10()
|
||||
InjectHook( 0x53A986, GetVehicleDriver );
|
||||
InjectHook( 0x53A9A9, GetVehicleDriver );
|
||||
|
||||
void* func;
|
||||
ReadCall( 0x53A990, func );
|
||||
CPlayerPed::orgDoStuffToGoOnFire = *(decltype(CPlayerPed::orgDoStuffToGoOnFire)*)&func;
|
||||
ReadCall( 0x53A990, CPlayerPed::orgDoStuffToGoOnFire );
|
||||
InjectHook( 0x53A990, DoStuffToGoOnFire_NullAndPlayerCheck );
|
||||
|
||||
ReadCall( 0x53A9B7, func );
|
||||
CFireManager::orgStartFire = *(decltype(CFireManager::orgStartFire)*)&func;
|
||||
ReadCall( 0x53A9B7, CFireManager::orgStartFire );
|
||||
InjectHook( 0x53A9B7, &CFireManager::StartFire_NullEntityCheck );
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user