summaryrefslogtreecommitdiffstats
path: root/src/control/AccidentManager.h
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2019-09-15 09:36:38 +0200
committerGitHub <noreply@github.com>2019-09-15 09:36:38 +0200
commitca6d2d3181c740d98205ea3fd0f20e87ea52ddc3 (patch)
tree6e3b9e8bb1f43b4952ed5f4910e3d7f05d47037f /src/control/AccidentManager.h
parentMerge pull request #207 from Nick007J/master (diff)
parentMerge branch 'carctrl_dev' (diff)
downloadre3-ca6d2d3181c740d98205ea3fd0f20e87ea52ddc3.tar
re3-ca6d2d3181c740d98205ea3fd0f20e87ea52ddc3.tar.gz
re3-ca6d2d3181c740d98205ea3fd0f20e87ea52ddc3.tar.bz2
re3-ca6d2d3181c740d98205ea3fd0f20e87ea52ddc3.tar.lz
re3-ca6d2d3181c740d98205ea3fd0f20e87ea52ddc3.tar.xz
re3-ca6d2d3181c740d98205ea3fd0f20e87ea52ddc3.tar.zst
re3-ca6d2d3181c740d98205ea3fd0f20e87ea52ddc3.zip
Diffstat (limited to 'src/control/AccidentManager.h')
-rw-r--r--src/control/AccidentManager.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/control/AccidentManager.h b/src/control/AccidentManager.h
new file mode 100644
index 00000000..999abddc
--- /dev/null
+++ b/src/control/AccidentManager.h
@@ -0,0 +1,27 @@
+#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();
+ CAccident* FindNearestAccident(CVector, float*);
+};
+
+extern CAccidentManager& gAccidentManager; \ No newline at end of file