diff options
author | erorcun <erayorcunus@gmail.com> | 2020-01-12 00:11:47 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-12 00:11:47 +0100 |
commit | 2d00d7b3e2026283498c6274ae2533211ea48f53 (patch) | |
tree | dc5d7e408858a5574d70d927eee670f1c9165cc6 /src/core/Accident.h | |
parent | Merge pull request #292 from erorcun/erorcun (diff) | |
parent | AccidentManager (diff) | |
download | re3-2d00d7b3e2026283498c6274ae2533211ea48f53.tar re3-2d00d7b3e2026283498c6274ae2533211ea48f53.tar.gz re3-2d00d7b3e2026283498c6274ae2533211ea48f53.tar.bz2 re3-2d00d7b3e2026283498c6274ae2533211ea48f53.tar.lz re3-2d00d7b3e2026283498c6274ae2533211ea48f53.tar.xz re3-2d00d7b3e2026283498c6274ae2533211ea48f53.tar.zst re3-2d00d7b3e2026283498c6274ae2533211ea48f53.zip |
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 |