Re3/src/core/Accident.h

32 lines
664 B
C
Raw Normal View History

2019-09-14 19:28:07 -04:00
#pragma once
#include "common.h"
#include "config.h"
class CPed;
class CAccident
{
public:
CPed *m_pVictim;
uint32 m_nMedicsAttending;
uint32 m_nMedicsPerformingCPR;
CAccident() : m_pVictim(nil), m_nMedicsAttending(0), m_nMedicsPerformingCPR(0) {}
};
class CAccidentManager
{
CAccident m_aAccidents[NUM_ACCIDENTS];
enum {
MAX_MEDICS_TO_ATTEND_ACCIDENT = 2
};
public:
2020-01-11 07:50:11 -05:00
CAccident *GetNextFreeAccident();
void ReportAccident(CPed *ped);
void Update();
CAccident *FindNearestAccident(CVector vecPos, float *pDistance);
2019-09-14 19:28:07 -04:00
uint16 CountActiveAccidents();
2019-12-22 10:28:16 -05:00
bool UnattendedAccidents();
2020-01-11 07:50:11 -05:00
bool WorkToDoForMedics();
2019-09-14 19:28:07 -04:00
};
extern CAccidentManager& gAccidentManager;