2019-07-12 16:01:22 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
class CEntity;
|
|
|
|
class CPed;
|
|
|
|
|
|
|
|
enum eEventType
|
|
|
|
{
|
|
|
|
EVENT_NULL,
|
|
|
|
EVENT_ASSAULT,
|
|
|
|
EVENT_RUN_REDLIGHT,
|
|
|
|
EVENT_ASSAULT_POLICE,
|
|
|
|
EVENT_GUNSHOT,
|
|
|
|
EVENT_INJURED_PED,
|
|
|
|
EVENT_DEAD_PED,
|
|
|
|
EVENT_FIRE,
|
|
|
|
EVENT_STEAL_CAR,
|
|
|
|
EVENT_HIT_AND_RUN,
|
|
|
|
EVENT_HIT_AND_RUN_COP,
|
|
|
|
EVENT_SHOOT_PED,
|
|
|
|
EVENT_SHOOT_COP,
|
|
|
|
EVENT_EXPLOSION,
|
|
|
|
EVENT_PED_SET_ON_FIRE,
|
|
|
|
EVENT_COP_SET_ON_FIRE,
|
|
|
|
EVENT_CAR_SET_ON_FIRE,
|
2020-05-19 14:39:19 +00:00
|
|
|
EVENT_ASSAULT_NASTYWEAPON,
|
|
|
|
EVENT_ASSAULT_NASTYWEAPON_POLICE,
|
2020-09-05 17:16:51 +00:00
|
|
|
EVENT_UNK, // Not on SA it seems
|
2019-07-12 16:01:22 +00:00
|
|
|
EVENT_ICECREAM,
|
|
|
|
EVENT_ATM,
|
2020-05-19 14:39:19 +00:00
|
|
|
EVENT_SHOPSTALL,
|
|
|
|
EVENT_SHOPWINDOW,
|
2020-04-19 04:14:13 +00:00
|
|
|
EVENT_LAST_EVENT
|
2019-07-12 16:01:22 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
enum eEventEntity
|
|
|
|
{
|
|
|
|
EVENT_ENTITY_NONE,
|
|
|
|
EVENT_ENTITY_PED,
|
|
|
|
EVENT_ENTITY_VEHICLE,
|
|
|
|
EVENT_ENTITY_OBJECT
|
|
|
|
};
|
|
|
|
|
|
|
|
struct CEvent
|
|
|
|
{
|
|
|
|
eEventType type;
|
|
|
|
eEventEntity entityType;
|
|
|
|
int32 entityRef;
|
|
|
|
CPed *criminal;
|
|
|
|
CVector posn;
|
|
|
|
uint32 timeout;
|
|
|
|
int32 state;
|
|
|
|
};
|
|
|
|
|
|
|
|
class CEventList
|
|
|
|
{
|
|
|
|
static int32 ms_nFirstFreeSlotIndex;
|
|
|
|
public:
|
|
|
|
static void Initialise(void);
|
|
|
|
static void Update(void);
|
|
|
|
static void RegisterEvent(eEventType type, eEventEntity entityType, CEntity *ent, CPed *criminal, int32 timeout);
|
|
|
|
static void RegisterEvent(eEventType type, CVector posn, int32 timeout);
|
|
|
|
static bool GetEvent(eEventType type, int32 *event);
|
|
|
|
static void ClearEvent(int32 event);
|
|
|
|
static bool FindClosestEvent(eEventType type, CVector posn, int32 *event);
|
2020-07-22 11:56:28 +00:00
|
|
|
static void ReportCrimeForEvent(eEventType type, size_t, bool);
|
2019-07-12 16:01:22 +00:00
|
|
|
};
|
2019-07-15 12:11:40 +00:00
|
|
|
|
2020-03-25 14:13:06 +00:00
|
|
|
extern CEvent gaEvent[NUMEVENTS];
|