AI accuracy issue (SA 1.0 only so far) - III/VC are unaffected

This commit is contained in:
Silent 2017-03-04 15:17:59 +01:00
parent 0a439cc963
commit 6496eb4441
2 changed files with 22 additions and 2 deletions

View file

@ -2009,6 +2009,22 @@ void __declspec(naked) CdStreamThreadHighSize()
}
}
void __declspec(naked) WeaponRangeMult_VehicleCheck()
{
_asm
{
mov eax, [edx]CPed.pedFlags
test ah, 1
jz WeaponRangeMult_VehicleCheck_NotInCar
mov eax, [edx]CPed.pVehicle
retn
WeaponRangeMult_VehicleCheck_NotInCar:
xor eax, eax
retn
}
}
static const float fSteamSubtitleSizeX = 0.45f;
static const float fSteamSubtitleSizeY = 0.9f;
@ -3106,6 +3122,11 @@ void Patch_SA_10()
Nop( 0x4065C2, 1 );
InjectHook( 0x4065C2+1, CdStreamThreadHighSize, PATCH_CALL );
Patch<const void*>( 0x406620+2, &pCdStreamSetFilePointer );
// AI accuracy issue
Nop(0x73B3AE, 1);
InjectHook( 0x73B3AE+1, WeaponRangeMult_VehicleCheck, PATCH_CALL );
}
void Patch_SA_11()

View file

@ -30,8 +30,7 @@ SA:
- CarAI timers
- space's bugged cargen command (014C)
- space's bugged sniper bullet checks (047B, 047C, and 037E) (maybe)
- https://kb.speeddemosarchive.com/Grand_Theft_Auto:_San_Andreas/Game_Mechanics_and_Glitches#Harder_AI_after_having_been_in_a_car
(does this affect III/VC?)
- https://kb.speeddemosarchive.com/Grand_Theft_Auto:_San_Andreas/Game_Mechanics_and_Glitches#Harder_AI_after_having_been_in_a_car (done for SA 1.0, todo - port)
- check if Tram signs are fixable without Wesser flipping out
More? since I lost the orig list