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