[saco] Implement and match CPlayerPed::ResetPointers()

This commit is contained in:
RD42 2024-05-05 18:29:24 +08:00
parent 29fc46aa00
commit 4a743549b5
2 changed files with 12 additions and 0 deletions

View File

@ -50,6 +50,16 @@ CPlayerPed::CPlayerPed()
field_2F9 = 0;
}
//-----------------------------------------------------------
// If the game has internally destroyed the ped
// during this frame, the ped pointer should become 0
void CPlayerPed::ResetPointers()
{
m_pPed = GamePool_Ped_GetAt(m_dwGTAId);
m_pEntity = (ENTITY_TYPE *)m_pPed;
}
void CPlayerPed::GiveWeapon(int iWeaponID, int iAmmo)
{
if(!m_pPed) return;

View File

@ -16,6 +16,8 @@ class CPlayerPed : public CEntity
{
public:
void ResetPointers();
WORD GetAmmo();
void GiveWeapon(int iWeaponID, int iAmmo);