From 8fab6842832d3141942e551a5d1597ed67d30db9 Mon Sep 17 00:00:00 2001 From: Sergeanur Date: Sat, 11 Jan 2020 14:49:37 +0200 Subject: move --- src/core/Accident.h | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 src/core/Accident.h (limited to 'src/core/Accident.h') diff --git a/src/core/Accident.h b/src/core/Accident.h new file mode 100644 index 00000000..6a3088e7 --- /dev/null +++ b/src/core/Accident.h @@ -0,0 +1,29 @@ +#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: + uint16 CountActiveAccidents(); + bool UnattendedAccidents(); + CAccident* FindNearestAccident(CVector, float*); + void Update(void); +}; + +extern CAccidentManager& gAccidentManager; \ No newline at end of file -- cgit v1.2.3