diff options
Diffstat (limited to 'src/core/Accident.h')
-rw-r--r-- | src/core/Accident.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/core/Accident.h b/src/core/Accident.h new file mode 100644 index 00000000..69889645 --- /dev/null +++ b/src/core/Accident.h @@ -0,0 +1,32 @@ +#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: + CAccident *GetNextFreeAccident(); + void ReportAccident(CPed *ped); + void Update(); + CAccident *FindNearestAccident(CVector vecPos, float *pDistance); + uint16 CountActiveAccidents(); + bool UnattendedAccidents(); + bool WorkToDoForMedics(); +}; + +extern CAccidentManager& gAccidentManager;
\ No newline at end of file |