[saco] Implement CPlayerPed::HasGoggles()

This commit is contained in:
RD42 2024-05-03 21:48:31 +08:00
parent 4a6bdad74a
commit c905d1dfb4
3 changed files with 18 additions and 2 deletions

View File

@ -78,6 +78,10 @@ typedef struct _PED_TYPE
PED_TASKS_TYPE *Tasks; // 1148-1152
char _gap480[128];
DWORD dwActiveVision; // 1280-1284
} PED_TYPE;
//-----------------------------------------------------------
@ -94,6 +98,7 @@ typedef struct _VEHICLE_TYPE
#define TRAIN_FREIGHT 570
#define TRAIN_TRAM 449
#define HYDRA 520
//-----------------------------------------------------------
// ---- weapon id defines ----

View File

@ -26,7 +26,7 @@ CPlayerPed::CPlayerPed()
field_2DE = 0;
field_2E2 = 0;
field_48 = 0;
field_2E6 = 0;
m_bGoggleState = FALSE;
field_2C1 = 0;
field_2C5 = 0;
field_2C9 = 0;
@ -45,3 +45,11 @@ CPlayerPed::CPlayerPed()
}
//-----------------------------------------------------------
BOOL CPlayerPed::HasGoggles()
{
if (!m_pPed) return FALSE;
return (BOOL)(m_pPed->dwActiveVision != 0 || m_bGoggleState);
}
//-----------------------------------------------------------

View File

@ -13,6 +13,9 @@ struct struc_97
class CPlayerPed : public CEntity
{
public:
BOOL HasGoggles();
CPlayerPed();
int field_48;
@ -43,7 +46,7 @@ public:
int field_2DE;
int field_2E2;
int field_2E6;
BOOL m_bGoggleState;
char _gap2EA[8];