diff --git a/saco/game/hooks.cpp b/saco/game/hooks.cpp index 6276e64..0c88adc 100644 --- a/saco/game/hooks.cpp +++ b/saco/game/hooks.cpp @@ -1837,9 +1837,28 @@ NUDE CWorld__ProcessLineOfSight_Hook() //----------------------------------------------------------- +ENTITY_TYPE* pSniperFiringEntity = 0; + NUDE CWeapon__FireSniper_Hook() { - // TODO: CWeapon__FireSniper_Hook + _asm mov eax, [esp+0x4] + _asm mov pSniperFiringEntity, eax + _asm pushad + + if(pSniperFiringEntity != (ENTITY_TYPE*)GamePool_FindPlayerPed()) + { + __asm + { + popad + retn 0xC + } + } + + if(pGame && pGame->FindPlayerPed()) + pGame->FindPlayerPed()->FUNC_100AFA70(); + + _asm popad + _asm ret 0xC } //----------------------------------------------------------- diff --git a/saco/game/playerped.h b/saco/game/playerped.h index 315a970..ec0f7f8 100644 --- a/saco/game/playerped.h +++ b/saco/game/playerped.h @@ -141,6 +141,8 @@ public: VECTOR* GetBonePosition(int iBone, VECTOR *vecPos); VECTOR* GetTransformedBonePosition(int iBone, VECTOR *vecOffset); + BOOL FUNC_100AFA70(); // .text:100AFA70 + int m_iCellPhoneEnabled; int field_4C[10]; struc_97 field_74[10];